The same motor that locks the tailgate, unlocks the mechanism.
According to the wiring diagram for the 04, there is a "AJAR" switch on the lock motor.
I suspect this ajar switch prevents you from locking if it thinks the gate is not shut fully?
_________________
Supporting Vendor and Moderator of LOST05 Jeep Liberty CRD Limited
Ironman Springs/Bilstein/Shocks
Yeti StgIV Hot Tune
Week's BatteryTray
No FCV/EGR
Samcos/ProVent
SunCoast/Transgo
Carter Intank-pmp
2mic.Sec.Fuel Filter
Flowmaster/NO CAT
V6Airbox/noVH
GM11 Bld.fan/HDClutch
IronrockArms/wwdieselMount98 Dodge Cummins 24 Valve