Gradle build failed - Unsupported class file major version 65

My project is on JDK 11 and I use gradle 6.71.
Due to organisation policies, I can’t upgrade these versions.

What can be the solution to this issue?

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occured configuring root project 
Caused by: org.gralde.api.GradleException: Failed to create Jar file <gradle installation dir>\.gradle\caches\jars-8\a7557eda44ad60d657564c874e6c14de\bcprov-jdk18on-1.78.1.jar

Please provide the full error with --stacktrace, optimally as build --scan URL.