First, I will say that this is not normal and most likely something misconfigured in your local environment.
repo.grails.org uses a certificate signed by "WE1 issued by GTS Root R4". You can find both of those under Root CAs and Subordinate CAs on https://pki.goog/repository/Root. They are normally present with JDK 17 and other versions as well, but you could download them and add them as trusted.
https://www.baeldung.com/java-list-trusted-certificates#reading-certificates-from-default-keystore has details for listing trusted CAs