Newer Java8 version than _251?

I am working on a project in IntelliJ which I want to build from a build.gradle file. But every time I try to build the project it says:

A problem occurred evaluating root project ‘TestMod’.

Failed to apply plugin [id ‘net.minecraftforge.gradle’]
Failed to validate certificate for Minecraft Forge repository, Most likely cause is an outdated JDK. Try updating at https://adoptopenjdk.net/ To disable this check re-run with -Dnet.minecraftforge.gradle.test_certs=false

I’m pretty sure though that I got the newest Java8 version installed(_251). Any ideas? Would help me a lot, I’ve been stuck on this for quite some time now.