First make sure that it is the sensor. All of the info that I could find said that to replace the knock sensor the engine must be removed or lowered.

I drilled a 2" hole and replaced it about 2 hours. The cover is double thick meta.l Resealing the hole was the hard part. I used fiberglass with the doughnut hole in place.
My first plan was to use a piece of angle alum. underneath the???: I had the glass handy.
Later, I thought that a piece of sheet metal pop riveted would be best.
I'll post the measurement and the socket size. I should have measured it, but didn't think of writing about it till later.I's covered up. Either take off the injector rail or drill a peep hole. a good light helps.