Given the older jvm / gradle it's possible that your repo only supports tls 1.2 for https (as it should) but jvm / gradle are unable to negotiate tls version (or perhaps ciphers). AFK atm to lookup jvm tls debug property to show more details. If possible run a newer Gradle version on a newer jvm (version 11 or 17 for LTS), using tool chain for compiling at Java 8.