Will changing my Buddy Pokemon reset it's Total Kilometer walked distance?
The total distance walked will not change, although current progress towards a candy will.
See screenshots. Deathturtle has 54.3km total and 0.3km progress towards candy. Switching the buddy for a Vulpix then back to Deathturtle resets the progress to 0km but retains the 54.4km total.
(I'm not sure where the extra .1km came from, I didn't move during these screenshots, perhaps a round up)
No, the total distance travelled will stay the same. The current progress towards the next reward will be reset, however.
I tried switching my Lapras out today and decided to make him my buddy again and his total distance started at 10.0 km, just as it was when I switched him out.