Trying to understand your problem, I cloned the repository and tried to run gradle on my local machine (ArchLinux) the same way Travis tries:
./gradlew build
And I got the exact same error message:
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
This is really strange and I have never seen it before. So I asked myself: Where does gradle search for that class? Right, in the wrapper's jar file. And that seems to be empty:
$ ls -lh gradle/wrapper/
total 4.0K
-rw-r--r-- 1 msrd0 users 0 Sep 16 23:51 gradle-wrapper.jar
-rw-r--r-- 1 msrd0 users 230 Sep 16 23:51 gradle-wrapper.properties
TL;DR
Whatever happened, your downloaded gradle wrapper is empty. You need to download the wrapper again, on Linux you can use this command (assuming you have gradle installed):
gradle wrapper
If your local gradle distribution is old and you want to keep the version that's currently used in your repo, run:
gradle wrapper --gradle-version=4.1