This is probably due to network configuration issue (proxy).
Make sure that any sort of antivirus or firewall installed on the system is not blocking anything in the MATLAB installation directory. Please also confirm that there is no IP protection software (eg Symantec Data Loss Prevention) blocking communication. You may need to check with your IT, because sometimes those programs are hidden from end users (eg: Symantec DLP).
If the network setting on your machine uses an HTTP proxy, modify the network configuration to add an HTTP proxy exception. In Windows, you can do this by : Going to Control Panel -> Network settings -> Internet Options -> Connections -> LAN Settings -> turned ON "Bypass proxy server for local addresses" with "Use a proxy server for your LAN".
If a proxy server is used you could also check if it might be not properly set in MATLAB and adapt the settings. To do so: Please enter the proxy server details in the MATLAB Preferences that can be opened from the Home Tab in the MATLAB toolbar Preferences -> Web section
This should hopefully resolve the error. Remember to restart MATLAB after changing settings.