I'm having pain in the back right of my knee when I hit the 5k mark cycling, what's going on?

Maybe a Baker's cyst. Time dependent pain with cycling is highly suggestive of a filling cyst. Your knee makes more joint fluid in response to repetitive loading, especially if there is n underlying injury to the meniscus and/or cartilage. The posterior capsule juxtaposed to the injured meniscus can form a cyst that fills with fluid during periods of heavy use. You should discuss treatment options with your physician.
Knee Sprain. You might have sprained your knee so rice treatment. Occasionally it is popliteal cyst which can be symptomatic. It can sometimes burst and cause acute swelling in calf & pain.