M2ts files have more “overhead” space wasted than MKVs. I dont’ know if mkvtoolnix is capable of re-encoding (I only use the mkvmerge GUI), but I think it’s likely that you’re okay. Especially if the mux operation took seconds or minutes instead of hours.
Make sure you’ve got all your audio tracks, though.