Can you put a 2004 Malibu engine in a 2002 Malibu using the 2002 wiring only? on 2004 Chevrolet Malibu

I recently put a 2004 3.5 lt engine in my 2002 Malibu, which had a 3.1 lt. engine. I used the 2002 fuel rail and plenum. I also replaced the harmonic balaner for one that had the relucter wheel on it because the 2004 doesn't use that type.The crankshaft position sensor has three wires instead of two on thee 2004 but the sensor for the 2004 is shorter than the 2002 so I have to use the 2004 sensor. What do I do with the third wire that would be coming from the sensor?

Asked by for the 2004 Chevrolet Malibu