IntelliJ Gradle Sync Failed: 'Could not resolve [artificact]'

I am having a problem with Gradle and IntelliJ. I am trying to create a new java project with a Gradle build but the Gradle build fails to resolve my defined dependencies every time. I have the most recent version of Gradle installed (6.8.3) and am using JDK 1.8. I am also macOS Big Sur. The build will finish but not completely as no .java files are created. One dependency I have defined is that for the postgresql driver from the maven repository. Upon resyncing the build, I get the error message:

“Could not resolve org.postgresql:postgresql:42.2.19.”

Possible solution: