Version-catalog needs jdk, not JRE?

Due to complex code structure we have, i’m supposed to checkout all root project and subproject gradle files (only gradle files, not source code) and pull the all compile/runtime dependencies of subprojects into a lib folder.

Recently i started using version-catalog feature with toml file and implemented above task which worked well in local machine (i have JDK installed). Pushed the changes to linux machine (it has only JRE installed) where its failing stating below reason:

 [exec] FAILURE: Build failed with an exception.
     [exec]
     [exec] * What went wrong:
     [exec] org.gradle.api.internal.catalog.GeneratedClassCompilationException: No Java compiler found, please ensure you are running Gradle with a JDK
     [exec] > No Java compiler found, please ensure you are running Gradle with a JDK
     [exec]

I’m not sure if this is expected?