I ran into the same issue on Mac. I tried to open Android Studio from the terminal and I also tried to reinstall it. None of them could fix the issue. Finally, I switched the Gradle JDK version through settings -> Build, Execution, Deployment -> Build Tools -> Gradle. I switched it to the openjdk17 that I installed by myself, and the problem was solved.