Cannot force gradle to use local groovy

Gradle ships with groovy version that causes “WARNING: An illegal reflective access operation has occurred” on JDK 11. I have local groovy 3.0.6, which has this warning fixed but I cannot force gradle to use my local groovy binary; it always picks the one it ships with.

I have tried “implementation localGroovy()” but no help I am on gradle 6.6.1

Any advice?