Back-formation from the plural miglia, from Latin mīlia n pl (“thousand”) in the phrase mīlia passuum (“thousand paces”). Doublet of mille.
Practice speaking and memorizing "miglio" and many other words and sentences in Italian.