So far plenty of answers that give good advice- but I will give one more. The knees rely on the quad muscles to keep working properly. Get the quads built up and it will not only help the knees- the whole leg improves.
Can commiserate with you as I had to give up running 25 years ago with knee problems. Like you it only came after a certain milage- and I took up cycling to keep the legs moving. Initially had knee problems but worked on the quads and no more problems.
__________________
How long was I in the army? Five foot seven.
Spike Milligan