I have an early 2011 MBP 15" running El Capitan OS X.
Late last week I upgraded my ISP internet from 20 mbps to 40 mbps. I connected my laptop to the router with an ethernet cable and it was testing as it should. However, when I ran the test on speedtest.net over wifi it was only clocking 20 mbps. I found that strange. I ran the test over wifi on my iPhone and also on my wife's 2008 MB laptop. Both clocked at or over 40 mbps. At this point I ruled out any problems with the router/internet and started looking at my MBP. After some looking around I noticed that my wifi was connecting 802.11g mode and not n. My wife's MB was connected to n. I logged into the router and changed the broadcast mode from 802.11 a/g/n to just 802.11 n to see if I could force my MBP to connect on this mode. The wifi connection dropped and would not connect. I ran a diagnostic and it said wifi was not associated, or something like that. I have the report but don't know which part to paste on here. After this I tried changing the router channel, Tried several different channels and still connecting to 802.11g. I've searched this forum as well as others and have not been able to find a solution to this problem.
Any suggestions welcome.
MacBook Pro, OS X El Capitan (10.11.1)
EDIT: Router encryption is set to WPA2 AES.