Thank you for the response, but after uninstalling my antivirus software wich includes a firewall (I am using Norman security suite) I was able to run gradle.
The weird thing is that when I disabled the firewall it didn't help so I assumed that it was not the problem.
Whoever when I deinstalled the software it suddenly worked. Now that I reinstalled the antivirus software it asked if I would allow gradle to connect to the internet.
It seems that I missed the firewall warning and it blocked it by default.
Thanks for your help LexManos!