The solution to this was to update Gradle to the latest version. I had thought that it was updated, but apparently I was wrong. If anyone else is having this same issue, make sure both Gradle and the Gradle wrapper are up to date by running the following command twice: ./gradlew wrapper --gradle-version latest
Find more information here: https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper