The knock sensors are under the intake manifold. Are you replacing them because of a code that is setting?
What year is your truck and what is the code please.
I'll send you the procedure for removing and installing the intake. Once you have the intake off, remove any of the foam from the bottom off the manifold. After you replace the rear knock sensor, look for signs of corrosion and water intrusion. If there is corrosion in the sensor or the wiring, you should replace the sensor and that harness. Once that is done, apply a bead of silicone RTV around the rear knock sensor opening and leave a gap in the sealant at the rear of the opening. This will prevent any water from getting trapped and causing damage to the new sensor. Reinstall the intake with new gaskets and you should be good to go.
Hope this is what you needed.
Please click the "Accept" button so I may receive credit for assisting you today.
Thanks for using Just Answer.
Caution: Unless directed otherwise, the ignition and start switch must be in the OFF or LOCK position, and all electrical loads must be OFF before servicing any electrical component. Disconnect the negative battery cable to prevent an electrical spark should a tool or equipment come in contact with an exposed electrical terminal. Failure to follow these precautions may result in personal injury and/or damage to the vehicle or its components.
Caution: In order to avoid possible injury or vehicle damage, always replace the accelerator control cable with a NEW cable whenever you remove the engine from the vehicle.
Notice: Use the correct fastener in the correct location. Replacement fasteners must be the correct part number for that application. Fasteners requiring replacement or fasteners requiring the use of thread locking compound or sealant are identified in the service procedure. Do not use paints, lubricants, or corrosion inhibitors on fasteners or fastener joint surfaces unless specified. These coatings affect fastener torque and joint clamping force and may damage the fastener. Use the correct tightening sequence and specifications when installing fasteners in order to avoid damage to parts and systems.
Tighten Tighten the engine wiring harness nut to 10 N·m (89 lb in).