Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated

Hi guys.
I’m trying to make a build of my game made in GameMaker Studio 2 for Android,
but I can’t while I keep getting this error:

FAILURE: Build failed with an exception.
** What went wrong:*
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.
> Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

I just can tell I installed JDK-14.0.2 if this helps…
I also went into the Android Studio, opened gradle-wrapper.properties and modified it to distributionUrl=https://services.gradle.org/distributions/gradle-6.6-all.zip - Android Studio then started to download and unpack Gradle 6.6 but… it didn’t help.

But if I go to c:\Program Files\Android\Android Studio\plugins\gradle\lib
I can see files like gradle-wrapper-5.2.1-sp1.jar there so I don’t know if Android Studio really updated that Gradle or not…

I don’t even know where is that Gradle installed or where to look…

Any ideas what can be wrong please?
Thank you very much for any help.

OK so I resolved it.
I searched for all occurences of “gradle-wrapper.properties” file on my disk and I changed distributionUrl property everywhere to version gradle-6.6-all.zip (I found 4 such files on my disk).
After every file I changed I run “gradlew” in corresponding directory to update.

Also I have added path to my gradlew.bat file to the system PATH and restarted PC.
Now it works.