First, get distributor from NG/NF/AAR, something like that. Distributor from KV have vacuum and centrifugal advance mechanisms and u don't need that, because it's done by ignition ECU. Second, I'm new to R5 but I think that distributor mark must fit when camshaft is in opposite position - whan crankshaft is with mark but camshaft isn't. Maybe I'm wrong. Because I have experience with R4 [actually I was able to set distributor precisely when assembling my 3A without running it] I did just as u

- only after some unsuccessful starts and timing corrections it managed to run @ ~500 rpm, then I turned earlier ignition until it started to run well.
How about knock sensor itself - did it have any cracks? If it's cracked, u can throw it out and get new one, it isn't expensive, I bought mine for something like 50 pounds, only when installing, that bolt must be tightened "with feel" - autodata states 10-15 nm, if I remember correctly. Difference - my former 3A, which never run very vell, without knock sensor at that time was able for 130-140 kmph vmax, with brend new knock sensor 170 kmph
