Sudden Knee Pain

Hi! So I’ve never really had knee pain before- mostly shins and ankles. But in my last half I started experiencing some major pain in right knee. Now I’ve noticed any time I go over 2 miles I feel a similar pain. Any thoughts on what might be causing this? And what I can do? Thank you!