And now you need to take it all back apart and replace the wiring harness to both sensors.
The water did not get in there all in one day. The problem is a poor design where the water can get under the intake manifold and has no way to get out.
The top of the engine does not get hot enough to burn off the water sitting on top of the engine and the foam at the end of the intake manifold does not let the water out.
The purpose of the foam is to give the plastic intake manifold some support on that end.
They are prone to cracking, especially if tightened too tight.
I have diagnosed this problem hundreds of times and the solution is always the same.
As you have already done, take the engine all apart. Clean out all the water before removing the knock sensors. Clean everything a second time. Put anti seize on the threads of the sensor. Put RVT on the new wiring harness. Build a mountain on top of the valley cover which should divert the water away from the center of the intake manifold area where the sensors are located. Put everything back together - making sure that everything is plugged in and working.
Job takes two people about 3 to 4 hours to do and a 12 pack of beer. A roll of paper towels, a shop vac, a air compressor with ******** nozzle, a roll of masking tape, a sharpie marker, a tool to remove the fuel lines, a 10 mm socket and a inch pounds torque wrench. A long extension to get the socket on the knock sensor, a 3/8 drive wratchet and appropriate socket for the sensor - some are 15 mm some are 18mm.
A can to catch the coolant from the MAF sensor. Does this sound familiar?