FAILURE: Build failed with an exception. "gradle" command in Terminal

When typing “gradle” in Terminal, this is the output:

I’ve been having issues with a java project involving gradle. I reinstalled it and still does not work.

The error message is pretty clear, isn’t it?
You are executing Gradle outside a Gradle project, or the Gradle project does not have a settings script which is now required.
There are very little things you can do outside a Gradle project like using init to initialize a new Gradle project or --version to display the version.
But looking at the paths you whited out, you are running Gradle in your user home directory and that is most probably not a Gradle project.

Besides that, if you are having issues with a Java project involving Gradle, there are basically two possibilities:

  1. it has (imho) a bug because it does not have the Gradle wrapper files checked in
  2. it has the Gradle wrapper files checked in and you should use exactly those, because then the Gradle version is automatically used for which the build is designed and know to work with. An installation of Gradle should almost never be necessary for anyone, especially not if you just want to build a project that uses Gradle