What is “gradle-server”?
What do you invoke?
What full error do you get, including stack trace?
Actually to run a build you should never need to have any Gradle version installed.
Imho each Gradle build that does not contain the four wrapper files has a bug.
I even start new Gradle projects using the wrapper of existing Gradle projects and never have Gradle installed manually but exclusively use it through the wrapper.