Low idle speed is usually caused by a bad IAC (idle air control). It is actually an actuator (not a sensor). It controls the idle speed by controlling the amount of air that is allowed to bypass the (closed) throttle plate inside the throttle body. If it sticks closed, then it doesn't allow enough air in, and the idle speed is too low.
BTW, the idle speed for a 4.0L (either OHV or SOHC) should be 750 - 830 rpm when the engine is warmed up.