As per Gradle release notes (Link):
Compatibility Notes
A Java version between 8 and 13 is required to execute Gradle. Java 14 and later versions are not yet supported.
Java 6 and 7 can still be used for compilation and forked test execution. Just like Gradle 5.x, any supported version of Java can be used for compile or test.
I think you need to downgrade your Java version.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…