Could not open settings generic class cache for settings file settings.gradle error through Jenkins

Hi Team,
I am getting below error while executing sonarqube analysis stage through Jenkins. Please, find version details as below.

Gradle 8.5
java version “21.0.4” 2024-07-16 LTS
javac 21.0.4

Error:-

2024-11-12T03:03:10.566-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2024-11-12T03:03:10.567-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2024-11-12T03:03:10.568-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2024-11-12T03:03:10.568-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2024-11-12T03:03:10.569-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not open settings generic class cache for settings file ‘/application/jenkins/workspace/ztm-kernel-client_develop_auto/settings.gradle’ (/home/appadmin/.gradle/caches/8.0/scripts/3iyngw405jdkah23873pbr201).
2024-11-12T03:03:10.569-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > BUG! exception in phase ‘semantic analysis’ in source unit ‘BuildScript’ Unsupported class file major version 65

You are not using Gradle 8.5 but 8.0 and that does not support running on Java 21.