Groovy 3.x that's shipped is not compatible with JDK 19 or 20. Please update it to 4.x latest. Thank you!