Moshe turned to God and requested that He appoint a leader for the people, since Moshe would soon not be with them (Bamidbar 27:15). However, God told him that he would not enter the land two Parshiot previously. In Parashat Chukat we read the account of Moshe's sin, resulting in the decree that he would not be able to enter into the land (Bamidbar 20:1-14). Why did Moshe wait until now to ask for a replacement?
A simple solution would point to the immediate context of his request. The preceding event is God's command to Moshe to ascend Mount Avarim and view the land, following which he would pass away (Bamidbar 27:12-14). Now is the time to request a replacement. However, such an explanation at best explains why he spoke now, not why he did not do so previously. Furthermore, Moshe lives still for some time. While we appreciate the immediate context, it is unclear why Moshe spoke in this context, not earlier and not later.
The Rebbe of Kotzk explained that Moshe was not originally at a loss for a candidate. As soon as he learnt that neither he nor Aharon would enter the land, he assumed that the future leader of the Jewish People would be Pinchas. As we see from the role he played at the end of Parashat Balak (Bamidbar 25:1-9), Pinchas' ability to lead and make decisions on the spare of the moment was phenomenal. He took action alone, publicly, and responsibly, and saved the people from God's wrath. Moshe knew him well (he was his great-nephew) and knew of his abilities well in advance. Therefore, Moshe did not originally ask who the leader would be; he was sure it would be Pinchas. However, when Pinchas acted as he did, Moshe understood that he could not be a leader. While God endorsed Pinchas' behavior, it was not an act of leadership. There is a place, and even the necessity, for zealots in the community; extreme circumstances demand extreme responses. But zealots cannot be leaders. Now that Moshe saw how Pinchas' personality expressed itself in the real world, he knew that he could not be the leader, and he turned to God to ask for a replacement.
If we consider how Moshe behaved in the many crises that he experienced, we notice that, while he was sometimes at a loss for action, he never acted in the slightest way against the people. He never behaved as a zealot in a social sense. He could smash the Tablets, and could smite the rock, but even in anger, he never moved against anyone. With the exception of Korach, who purposely pitted himself against Moshe, leaving him no option, never did Moshe abandon his position as a defender of the people. Pinchas saved the people, but not as a leader. Moshe turned here to God and asked that the people not be "as sheep that have no shepherd" (Bamidbar 27:17). The people need a shepherd, not a savior.
Courtesy of Yeshivat Har Etzion - www.etzion.org.il