" The application could not connect to MathWorks."
As many other Matlab users I am on a corporate network with lots of kooky stuff which I have no control of whatsoever. I've wasted a day tweaking Proxy, Firewall and Java (Antivirus is absolutely out of my control). Still could not install Matlab.
However I could instal Matlab AFTER uninstalling a program named ZScaler and all of its instances from the "Apps & Features" dialog (Add or remove programs system setting). This miserable ZScaler is a part of some sort of corporate cloud solution and messes things up pretty badly.
Ripp this ZScaler off your computer and you will be able to install Matlab. All my cloud drives still work, at least in the office area. I am on W10.