WARNING: This page is about a different car, the 2018 Nissan Titan XD and 2018 Nissan Titan. However, it is still accessible from the selected car via links, so may be relevant.
Range sensor is installed to top of transfer assembly.
Courtesy of NISSAN NORTH AMERICA, INC.
Range sensor detects engagement status of 4H-4LO sleeve and transmits signal to transfer control unit.