as the article I posted suggested- icing/massage (roller)/specific stretches/specific strength exercises would all be good steps; I think backing off the weight of the squats initially wouldn't hurt either

if it still doesn't go away, try eliminating squats entirely and see if you still get the pain when you hit 4-7 miles hiking- you may find it's not the squats or definitively that it is