This "can't connect to server" error is usually encountered when the server is down or in maintenance. Either way, you should check your firewall to see if the application is allowed to communicate with Internet. Please turn it off then perform the same operation.
In most of the cases, the error fixes itself, meaning the server will come online at some time and you can download the game you want.