Failure of wire is extremely rare, unless it's had physical damage - melting, chafing over an edge or squashing. The usual reason for a failed wire being diagnosed is when people don't realise it's a screened cable and including the screen in the signal connection.
It should be wired with the inner core connected to ECU at one end and knock sensor at the other. The screen should be connected to Earth at the ECU end and cut short & insulated at the knock sensor end.
If the original cable has been mis-wired at the knock sensor end, then it should be recoverable by cutting it then re-making correctly, extending the inner core if needed by soldering & sleeving a new single core wire to the sensor.
To strip a screened wire, gently slice the outer insulation with a knife and cut off. The screen strands can then be pulled to one side to reveal the inner wire which can then be stripped as a normal wire. For the knock sensor end, just cut off the screen strands and ideally sleeve over so they can't touch anything.
To test the original, check for short circuit between screen and core, and check continuity of the core from ECU to sensor. If these are ok then there should be no need to run a new one.
If you do run a new one, try to avoid running it near the ignition coil or leads.
_________________
If at first you don't suck seed, try drier grain.