Greetings, sorry about your pain.
going by your description it a muscle imbalance issue.
IF knee muscles work more than gluteus muscles you end up having knee pain especially after running on a treadmill.
Next Steps
do quadriceps stretching, hamstrings stretching. ice the area above knee joint and around knee joint for 10 min twice a day. you will feel better in a couple of days. Later when pain has subside strengthening exercise should be started. Simultaneously you can visit a physio near you to get cured.
Health Tips
avoid using treadmill until you have no pain. if any concerns do let me know.