It can happen if you have proxy settings and you are not connected to it.
example:
-You are home and forget to connect to your company network with your VPN client. -You have in your gradle.properties file systemProp.https.proxyHost=Your Company Proxy systemProp.https.proxyPort=Your Company Proxy Port -Gradle try to find jcenter and and don’t get it because it has no response from the proxy setted before
Like Mark says if you are in that case, you should see it with --stacktrace or --debug on gradle build command.