Just an update...
Ok, so the knock sensor is located on top of the block towards the back. It's right under the throttle body. It's visible once you remove the top mount intercooler.
After the replacing the knock sensor the engine light has gone away and hasn't come back after a week now. So it looks like a good fixed.