It would be nice if gradle and other Java tools could find JDKs installed by scoop.
The easiest solution is to link them under ~/.jdks/ where Intellij is normally installing them.
e.g. ln -s ~/scoop/apps/openjdk21/21.0.1-12 ~/.jdks/openjdk-21.0.1
Another much more complicated option would to to register them in ~/.m2/toolchains.xml.