I still have no clue how to fix this
do you have a belkin router? if so, that's the issue. the wii u and 3ds don't bode well with belkin routers. they really just hate them.
i wasn't able to play mario kart 7 online until shortly after mario kart 8 came out. then i was having problems with mario kart 8 multiplayer.
the best way to fix it is to add your 3ds' ip to your router's DMZ and turn off your router's firewall when you play. you can get the ip through the DHCP client list on your router's control panel, assuming it has that option (your 3ds needs to be on and connected to your router to see it on the list). then find your router's DMZ, and paste the ip you got into it. then, find out how to turn off the firewall.
i hoped this helped. if not, google it.