./gradlew genSources doesnt work for me no matter what i try

Im curretnly trying to get into minecraft modding, but this one command doesnt work. I havent tried alot of things, yet i have tried reinstalling my JDKs a few times now. Ive also tried looking online, yet havent found a good answer, so i decided to ask here.

Im using Oracle OpenJDK 21.0.7, and doing it on 1.20.1 of minecraft btw

what happens when i try to run it:

> Task :genSourcesWithVineflower
Decompile cache stats: 0 hits, 4786 misses
Error: Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain
Caused by: java.lang.ClassNotFoundException: worker.org.gradle.process.internal.worker.GradleWorkerMain

> Task :genSourcesWithVineflower FAILED

Error: Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain

Caused by: java.lang.ClassNotFoundException: worker.org.gradle.process.internal.worker.GradleWorkerMain

Execution failed for task ':genSourcesWithVineflower'.
> There was a failure while executing work items
   > A failure occurred while executing net.fabricmc.loom.task.GenerateSourcesTask$DecompileAction
      > Failed to run Gradle Worker Daemon
         > Process 'Gradle Worker Daemon 8' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 17s
1 actionable task: 1 executed

my gradle properties file:

org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.17.2
loom_version=1.11-SNAPSHOT

# Mod Properties
mod_version=0.1-1.20.1
maven_group=net.bjorn.tutorialmod
archives_base_name=tutorialmod

# Dependencies
fabric_version=0.92.6+1.20.1

What Gradle version are you using?

And can you share a build --scan URL?

it says in gradle JVM “Project SDK 21”

That’s not an answer to either of my questions

i dont know exactly how to check my gradle version, im very new, also how do i send a build --scan url?

Execute with the argument, copy it from the end of the output