A person may already be inside the congregational mosque when Friday prayer becomes due—for example, while observing iʿtikāf. No further journey is required merely to reach the same destination.
The travel requirement falls away because the need that made travel instrumental is absent. This does not mean that the person's underlying obligation to perform Friday prayer has been removed.
The absence of a need for the means is not the same as the absence of the obligation to perform the objective.