On the INLET side of the block, roughly in the middle, and preferably near the top of the block (i.e. nar where combustion takes place)
Some applications do mount them on cylinder heads, but its generally not a good idea as they tend to pick up a lot of extra noise from the valvetrain.
Like most sensors, knock sensors don't like heat very much so don't like to be near exhaust manifolds
If you are using 2 sensors, equally space them between pairs of cylinders.
However, unless you are going to have bosses welded to the block, you will probably end up using whatever boss you can find
Make sure that you tighten the bolt(s) to the right torque as specified by the sensor manufacturer, as this has an influence on the detection ability.