I was looking at the Advent of Code 2023 day 11 problem and misread it to think that the question ended up asking something akin to what's below (after transforming the positions of the "galaxies"), and I'm wondering what kind of optimization problem this is. See nearly equivalent problem, but with specified values for distance constraint.
Given a set of $N$ points on a lattice where pairwise distance is $D_{ij} = |(\Delta x)_{ij}| + |(\Delta y)_{ij}|$, select the set of distance pairs, that include at least $N-1$ of the points such that the sum of these chosen distances are minimized and that no point is in more than one of the distance pairs. I.e., in graph $G = (V,E)$, find a perfect or near-perfect matching that minimizes the sum of weights in the matching.
I heard of the vertex cover problem from Numberphile, so I googled for edge cover and got something on wikipedia, but I'm not sure if this is a case of that problem or not.