Although, 끝내다 and 마치다 both used interchangeably each other in daily life, there are some differences in usage.
끝내다 used for the work which is affected by intention or will
마치다 used for the work which is not affected by intention or will
끝내다 used for the work which can be stopped
마치다 used for the work which can not be stopped
끝내다 used for the work requires assertive efforts
마치다 used for the work requires adaptational patience
끝내다 used for negative works
마치다 used for positive works