First time will always suck, stretch and foam roll the heck out of your hips, glutes, and legs. 5km is a usual starting point, so you did good.
Moving forward, there are three parts of rucking to improve: speed, weight, and distance. Only every increase on of these at a time (i.e. move faster one session, long another, heavier a third).
I'd also recommend capping yourself at 2 sessions a week; more than that usually requires a specialized plan.