Update mindistance.h

Change the name of Swap() to Replace()