Kindly visit a nearby sports Physiotherapist for detailed assessment. Yes in many cases, foot and knee are inter-related. In your case, walking for such a long distance could also be one of the reasons for the knee pain.
Next Steps
Till you visit a specialist, you can immerse your foot in Epson salt, for 10 to 15 mins in lukewarm water. That will help to give relief in the pain while you move your foot inward.
Health Tips
Use a knee support till you get your problem assessed when you go for your walks.