Definitely a good idea to check fuses and bulbs before you crawl under and check the switch. As you can see from this pic, it's in a real difficult spot.
The black cap is held on by two thin clips that have a tendency to get brittle with age. Pry them just a hair then pull off the electrical connector. It's water tight, so it may give a fair amount of resistance. I also suggest taping or tying the connector out of the way when you go to remove the switch. Otherwise the connector will be in the way, and may get damaged. I managed to tuck mine under the wire harness, but some wire tie would have been easier.
The switch has a big steel ball at the transmission side which is depressed to make the connection
In my case, the switch was still working electrically, but the steel ball wasn't getting pushed in far enough by the shift lever. I opted to replace it, since there isn't a good way to adjust it, and I didn't want to over torque the aluminum transmission housing threads.
As you can see from the first pic, there isn't much room to swing a socket and a flat wrench won't work. The best would be a large size ratcheting flat wrench with pivoting ends, but I didn't have one.