Gradle is trying to use a JDK that has been uninstalled from my system

I had the same issue and I removed .gradle folder from user and it worked perfectly