Open IntelliJ on your project and go to File >> Project Structure >> Project and on the option Project SDK Select java 11 and apply the changes.
Intellij Project structure
Edit——–
Then try these options on File >> Settings.
1.Set Gradle JVM Home
Gradle JVM
2.Set the JDK version in the Project module settings
JDK version in the Project module
3.Check the JDK version in the Modules
version in the Modules
Close IntelliJ and open it again.