Certainly every Jew is permitted to go up to Eretz Yisroel, but they must not go up with a strong hand and to build for themselves the walls of Jerusalem. When Nechemiah said, “Let us build the walls of the city and no longer be a shame” (Nechemiah 2:17), it was with the king’s permission, as it is written (2:8). But Toviah, who asked Nechemiah regarding the building of the wall, “Are you rebelling against the king?” did not realize that it was being done with the king’s permission. (Maharsha’s commentary on Kesubos 111a)
In ancient times, a city wall was a mechanism of defense. Thus the Maharsha means that for Jews to go up and live in Jerusalem under the protection of the ruling power is fine, but if the Jews start to build the walls without permission, it is a signal that they seek independence and self-defense. It is not the building of the wall that violates the oath; it is the rebellion against the ruling power symbolized by building the wall.
In our times, city walls are quaint historic structures and they mean little in terms of defense. The Zionists did much more to declare their independence and fight for it. They certainly transgressed this oath according to the Maharsha.
The Maharsha was clearly against Zionism, because he says that the only time it is permitted to build a wall or other means of self-defense is if Jews live under a ruling power or empire, such as the Persian empire in Nechemiah’s time, and the king gives permission. Then their self-defense does not show independence; it is nothing more than a police force against local bands of marauders.