When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
I don't mean to be a smart a** but is the "Sensor" you are referring to located right between the shock absorbers? If so, the "Sensor" you are looking at is probably the Drain Plug for the Transmission.
The only sensors/switches on the transmission are the 5th Gear Speed Sensor and the Neutral Indicator Lamp Switch. Since you say your 6th Gear Light and Neutral lamp are working, those items are OK.
Are you sure this wire is supposed to go to this Engine/Transmission? Maybe it's a wire from the bike, as someone else suggested, like the rear O2 Sensor, or the exhaust bypass valve that is used on European export bikes.
Slideshow: Jason Momoa's latest restoration project blends 1920s Harley-Davidsons with modern electric technology, creating some of the most unusual hybrid motorcycles ever built.
Harley-Davidson Fat Boy Becomes a Dark, Decepticon-Inspired Custom
Slideshow: Killer Custom's latest build relies on styling changes rather than performance upgrades, giving the cruiser an entirely different personality.
7 Surprising Harley-Davidson Products that Are Not Motorcycles
Slideshow: The bar-and-shield logo shows up on far more than motorcycles, some of the company's most unexpected products have nothing to do with riding.
Slideshow: From the troubled AMF years to modern misfires, these bikes earned reputations for reliability issues, questionable engineering, or disappointing performance.
Crazy Bunderbike Build Looks Amazing, But Is It Impossible to Ride?
Slideshow: The Swiss custom shop has taken a Harley Softail and stretched it into something so long and low that it looks closer to a rolling sculpture than a conventional motorcycle.