This proverb means that if you fail at something, it doesn't matter whether you fail by a little or a lot. For example - If you come second in a race it doesn't matter whether you lose by one inch or by one mile; you still lose. Failure is failure no matter how small the margin of failure.
This saying dates from the 18th century. The expression may or may not be American in origin, but the root source is certainly the British Isles. James Kelly included it in A Complete Collection of Scotish Proverbs, 1721:
The exact phrase "a miss is as good as a mile," seem to first be found in print in the American work,The American Museum, Volume 3 , 1788. It says, "A smart repartee... will carry you through with eclat such as, 'a miss is as good as a mile.'""An inch of a miss is as good as a span - a span is the distance from the tip of the thumb to the tip of the little finger of a man's hand, usually formalised as 9 inches."
It means a miss by a small distance is just as good as a miss by a large distance. Either way, it is still a miss.
Our American version is: 'close but no cigar.'