The thermostat is located in the lower part of the motor, where the lower radiator hose connects to the block. I would also recommend a cooling flush while you are at it. How do you know you need a new thermostat? are you having cooling problems?
Follow these instructions--
4.7L engine - Thermostat removal
WARNING: DO NOT LOOSEN RADIATOR DRAINCOCK WITH SYSTEM HOT AND PRESSURIZED. SERIOUS BURNS FROM COOLANT CAN OCCUR.
1. Disconnect negative battery cable at battery.
2. Drain cooling system. Do not waste reusable coolant. If solution is clean, drain coolant into a clean container for reuse. If thermostat is being replaced, be sure that replacement is specified thermostat for vehicle model and engine type.
3. Remove splash shield.
4. Remove lower radiator hose clamp and lower radiator hose at thermostat housing. See cautions above for removing radiator hose clamps.
5. Remove thermostat housing mounting bolts, thermostat housing and thermostat.
4.7L engine - Thermostat installation
1. Clean mating areas of timing chain cover and thermostat housing.
2. Install thermostat (spring side down) into recessed machined groove on timing chain cover.
3. Position thermostat housing on timing chain cover.
4. Install two housing-to-timing chain cover bolts. Tighten bolts to 115 in. lbs. (13 N·m) torque.
CAUTION: Housing must be tightened evenly and thermostat must be centered into recessed groove in timimg chain cover. If not, it may result in a cracked housing, damaged timing chain cover threads or coolant leaks.
5. Install lower radiator hose on thermostat housing.
6. Install splash shield.
7. Be sure that the radiator draincock is tightly closed. Fill cooling system. See refill directions above.
8. Connect negative battery cable to battery.
9. Start and warm the engine. Check for leaks.