Gradle corruption error

I am coding something in Java using IntelliJ Idea and Gradle, trying to use version 3.0.
However, in the build tab, when I open my project, I get this:

Unable to find method 'org.gradle.api.invocation.Gradle.getIncludedBuilds()Ljava/util/Collection;'
org.gradle.api.invocation.Gradle.getIncludedBuilds()Ljava/util/Collection;

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

I have tried the ‘redownload dependencies and sync project’ thing and the ‘stop gradle build processes’ thing. I also tried deleting the dists so they would redownload, and manually installing it using the command ./gradlew wrapper --gradle-version 3.1 but those didn’t work either. Can someone advise me on what to do next please.
Thanks

Why would you want to use such an ancient Gradle version?
It is from 2016!
Also it is a bit unclear, what you try.
You said about 3.0 where the method it complains about did not exist yet.
3.1 had that method first in an incubating state.

But anyway, what you hit actually is an IntelliJ bug, either implementation or documentation bug.
It’s documentation states that it is compatible with Gradle 3.0, but it is not.
If the project uses Gradle 3.1 or newer it works but in Gradle 3.0 IntelliJ tries to use the method mentioned in the error which does not exist yet but is only added in 3.1.
So either their documentation stating it is compatible with 3.0 is erroneous, or their implementation is erroneous.
With Gradle 3.1 it works fine to sync the project.
If you get the same error it was probably not picked up properly.
Restart IntelliJ, also try to delete the IJ project files, and then reopen the project when 3.1 is used in the wrapper properties.

I created an issue for JetBrains at https://youtrack.jetbrains.com/issue/IDEA-314166/Gradle-3.0-support-broken

They are working on a fix, suggested work-around is, to disable the Android plugin.