You are a more advanced cyclist than me and I can't say anything about your specific knee pain,
but these are the easy changes I made to take care of my knee pain.
Adjusted shoe cleat to have ankle, knee and hip all aligned.
Raised seat to straighten legs but not so far that the knee locked at the bottom of the stroke.
Moved seat forward.
Pedalled more easily in a lower gear.
The solution for me was to play with bike fit to ease knee pain.
Good Luck on your metric in 3 weeks. I hope you are able to do it, even if you don't go out to set a personal best time.