Knees wear out.
People who run a great deal quite often have knee problems later in life.
So you should take great care of your knees and preferably not run if it hurts.
Once very important thing is to use proper running shoes designed for your particular running style.
This can help cushion your feet, ankles, knees and hips when you run.
This in turn could keep you injury free for longer.
I have had to give up running because of knee joint pain; however that was only about 3 years ago and I am 67.
I can still walk, but if I walk too energetically (long fast strides) I get knee pain as well.
Cycling seems O.K. but for the occasional little niggle.