Welcome to the garage. I presume you have the 42RE transmission on it, the solenoid is on the valve body, inside the tranny. Its item 9 on attached picture. And by the way, your Jeep is a WJ and not a WK.
JEEP Grand Cherokee 4.7 Lmtd 2004
HID 8000K in low and fog / Quad Squad member
Monroe Reflex shocks /
Pirelli Scorpion ATR 245/65/17/
Transgo reprogramming shiftkit.