Could not determine java version from '17.0.7

Hello everyone,
I have this error:
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '17.0.7'.

I use this version of gradle :

terminal java version: java version “1.8.0_401”
Java™ SE Runtime Environment (build 1.8.0_401-b10)

setting file build.gradle : compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

I’m losing something??Hepl me

If you run ./gradlew --version you most probably will see, that you run Gradle with Java 17 which is only supported since Gradle 7.3.

Check for example your JAVA_HOME environment variable.