They could add a signature check to the wrapper script to resolve this concern.
It already exists: https://docs.gradle.org/current/userguide/gradle_wrapper.htm...
Huh, TIL. Still, it doesn't seem to be enabled by default on new projects (although I only tried in Android Studio, several months ago)
While I also use and enjoy Gradle, this is IMO its biggest weakness. We've all seen the recent supply-chain attacks, and ~everyone's infra is at risk here. There isn't even anything similar to Javascript's subresource integrity!
I'm sure that the people hosting Gradle are very cautious, but it only takes one slip-up...