Execution failed for task ':compileJava'. Using Java jdk1.8.0_301

Hi! i am trying to mount a Minecraft spigot Plugin, and when i try to mount it, gradlew trows this, what can i do? i tried several times changing java versions

Did you try JDK 12 or newer? The syntax failing to compile (switch expressions/arrow case labels) was introduced in Java 12.