c. 1300, distaunce, "a dispute or controversy, civil strife, rebellion;" early 14c., "disagreement, discord, strife;" from Old French destance "discord, quarrel" (13c.), with later senses directly from Latin distantia "a standing apart," from distantem (nominative distans) "standing apart, separate, distant," present participle of distare "stand apart," from dis- "apart, off" (see dis-) + stare "to stand," from PIE root *sta- "to stand, make or be firm."
Meaning "remoteness of space, extent of space between two objects or places" is from late 14c. Also "an interval of time" (late 14c., originally distaunce of times). Meaning "remote part of a field of vision" is by 1813. The figurative sense of "aloofness, remoteness in personal intercourse" (1590s) is the same as in stand-offish.
At a distance "far away" is from 1650s. To keep (one's) distance was originally figurative (c. 1600). Phrase go the distance (1930s) seems to be originally from the prize ring, where the word meant "scheduled length of a bout." But it also was a term in 19c. horse-racing heats, where distance meant "the space behind the winning horse in a race that other competing horses must be inside to avoid being disqualified for subsequent heats."
1570s "place at a distance" (transitive); 1640s, "leave at a distance by superior speed" (intransitive), from distance (n.). Sense of "to make to appear distant" is from 1690s. Specific sense of "leave behind in a (horse) race" is from 1670s (see the noun). The meaning "to keep at a distance" is by 1786, marked as "? Obs." in OED, but that was before 2020. Related: Distanced; distancing.
Distancing as a verbal noun is from 1670s; social distancing was used in sociology by 1960s in reference both to physical space and status.