How come Battle net on GOG for WC2 has been shut down?
Battlenet is only available in the SD mode, so make sure you are using that before trying to connect. The HD mode doesn’t have Battlenet support.
Additionally, there are network configurations required to connect to Battlenet. There’s a link for that on GoG’s WC2BNE page.