The Shulchan Aruch (90:16) writes: If one is going on the way and he arrives at a city and wants to stay there, if in front of him and within four mil there is a minyan, he must go there. If, however, to get to a minyan he must travel backwards (and retrace his steps) then he is only required to travel a mil.
The Mishnah Berurah (s.k. 52) writes: If one is sitting in his house, he has the status of one who must travel backwards. Therefore, if one is at home he must travel up to a mil to catch a minyan. This only applies in the morning, however, at night one isn’t required to travel even a mil to get a minyan. (The Igros Moshe, (Orach Chaim 2:27) writes: It is logical that if one is in the comfort of his home, he should travel more than a mil to find a minyan. When traveling on the road we are lenient with going backwards up to a mil, as one is traveling and trying to get somewhere, and it’s a one off, however, when at home there is less reason for leniency, especially if one will end up missing davening with a minyan on a constant basis. However, since it is unclear as to how far he must go, we can’t be more stringent than a mil. The Shu”t Betzel HaChochmah (4:21:11) writes: If one is at home and there is a shul further than a mil, but within a parsah one should be stringent and go).