For best WiFi performance your 2.4 and 5GHz networks should have the same SSID and passwords. You Mac will pick the best band to use based on different criteria such as distance from the router, Interference, and other things.. From what you stated, your Mac should connect to the 5GHz band when connecting if both networks have the same name and password. If you are connecting to the 2.4Ghz band it may be that there is some interference.
Once you change things back to the same name and password in the router, then you should delete the settings for the network from your system, and then add it back,
To delete it you need to use KeyChain Access which is in your utilities folder. and do a search for your network name, and delete the entries.
Next go into the System Settings to Network. Click on WiFi and then Advanced on the bottom. Here you need to locate your network name and delete entries by clicking in the 3 dots in a circle and select Remove From List.
Once this is done, reconnect to your network and enter the password.
Go Back into Network in the system settings and click on WiFi. This time Click on Details. In the Window that comes up click on DNS on the left side. Under DNS Servers click the + sign and enter
8.8.8.8 then click the + sign again and enter
8.8.4.4 and then OK. This will help speeding up your web browsing by using Googles public DNS.
Next toggle your WiFi, off and then back on.
You can tell which band you are connecting to as well as your connection speed and other info by selecting the Airport menu while holding down the Option key. You will get a meny like this.