On an IFR flight plan, 14 CFR 135.233 requires
§ 135.223 IFR: Alternate airport requirements.
(a) Except as provided in paragraph (b) of this section, no person may operate an aircraft in IFR conditions unless it carries enough fuel (considering weather reports or forecasts or any combination of them) to—
(1) Complete the flight to the first airport of intended landing;
(2) Fly from that airport to the alternate airport; and
(3) Fly after that for 45 minutes at normal cruising speed or, for helicopters, fly after that for 30 minutes at normal cruising speed.
Constraining from the other side, 14 CFR 91.169 requires
(c) IFR alternate airport weather minima. Unless otherwise authorized by the Administrator, no person may include an alternate airport in an IFR flight plan unless appropriate weather reports or weather forecasts, or a combination of them, indicate that, at the estimated time of arrival at the alternate airport, the ceiling and visibility at that airport will be at or above the following weather minima:
(1) If an instrument approach procedure has been published inpart 97 of this chapter, or a special instrument approach procedure has been issued by the Administrator to the operator, for that airport, the following minima:
(i) For aircraft other than helicopters: The alternate airport minima specified in that procedure, or if none are specified the following standard approach minima:
(A) For a precision approach procedure. Ceiling 600 feet and visibility 2 statute miles.
(B) For a nonprecision approach procedure. Ceiling 800 feet and visibility 2 statute miles.
(ii) For helicopters: Ceiling 200 feet above the minimum for the approach to be flown, and visibility at least 1 statute mile but never less than the minimum visibility for the approach to be flown, and
The maximum distance for an alternate airport is limited by your aircraft’s fuel range, but practicality (not losing the purpose of the trip) will tend to be more constraining than math. The minimum distance depends on the weather.
Considering it from this perspective, given that the objective is safety, stipulating “at least X but no more than Y units of distance” would be inappropriate for similar reasons as to why we tend to think of fuel in terms of time rather than length.