This applies to the era of the Imams (a). If the Prophet (s) or Imam (a) leads the prayer, then it’s mandatory upon all men who live within that distance to attend the prayer. But in the time of Ghayba, it’s not mandatory. It’s optional. Even if you live close by, you are not required to attend.