Running on treadmill usually doesn't affect your knee joints at such an early age.
If running is hurting the knee, it may be due to increased load over the knee joint surfaces. If it is temporary, nothing to be done for that. If it i happening again and again, or even if you are running for less time, you should get some investigations like X ray of knee and if needed MRI of the knee.
Next Steps
You can apply a knee cap for support while doing running exercises
You can also try and avoid running for few days if it is hurting more..