The wire for the sensor emerges from underneath the filter body.

The connector is an idiot-proof connector. It will not mate with the wrong connector.

On the Pajero, the connector it mates with is mounted on the firewall near the driver's side. Don't know if this is also the case with other 4d56 vehicles. Just look for a dangling connector that is a match with the connector on the base of your fuel filter.