On the side where the solenoid connector is, are also both speed sensors.
Regarding the check engine light, it should be on with ignition in run and engine not running.
The connector which is melted, can it have touched a hot exhaust part?
JEEP Grand Cherokee 4.7 Lmtd 2004
HID 8000K in low and fog / Quad Squad member
KYB Gas-a-Just shocks / Pirelli Scorpion ATR 245/65/17 - Transgo reprogramming shiftkit.