Looks like the switch is on the side near the top. You can disconnect the harness from it and see if it's bad with a continuity checker.
In reverse there should be continuity
Any other gear there shouldn't be continuity
SWITCH ASSY-REVERSE LAMP - Frontier (D22U) 1998-1999 2WD M/T, 1999 (FED. :: Nissan Parts, NISMO and Nissan Accessories - Courtesyparts.com
If you click on the Illustration link on the Courtesy Nissan page, the diagram for your truck is the second one from the top. Look at the left side of the picture for part 32005.
In reverse there should be continuity
Any other gear there shouldn't be continuity
SWITCH ASSY-REVERSE LAMP - Frontier (D22U) 1998-1999 2WD M/T, 1999 (FED. :: Nissan Parts, NISMO and Nissan Accessories - Courtesyparts.com
If you click on the Illustration link on the Courtesy Nissan page, the diagram for your truck is the second one from the top. Look at the left side of the picture for part 32005.