Here is one knock sensor connector. I would guess it is #2 but I don't know for sure. Just unplug it, start the engine and see if you get error 1_31 (knock sensor #1) on top of 1_32 (knock sensor #2). That is the easiest way to find out. If yes it was #1, if no it was #2.
And here is the other one shown with the engine out of the car. This one will be a little harder to get to.
And here you can see the knock sensor mounted to the bridge on the shortblock (before the rebuilt):
and after the rebuilt.....
Note the orientation of the wires. Only the black part comes out. Do not remove the brides. The workshop manual recomends to replace the microencapsulated Hexagon mounting screw when replacing the knock sensor since the correct torque of 20Nm is critical for proper operation. The part number is 999 217 082 02. I don't know how critical that is. Do not use a washer.
Ingo