I'd suggest draining at least some of the coolant before removing the T-stat. If you don't want to bother with crawling underneath and opening the radiator drain, you can use a small hose and siphon out a gallon or so. For sure follow the
refill/bleed procedure when you're done.
The temp sensor is not in the black duct work - it's in the intake area. Kinda buried below the wires & connections for the fuel injectors, etc. BTW, there are a couple of temp sensors. One for the ECU (computers), the other for the gauge.
The picture below shows the sensor for the ECU (CTS = coolant temp sensor), the sensor for the gauge is located a little bit forwards of the one shown and has single spade terminal, IIRC. (picture from the L-jet diagnosis page)
