Completing One's Life Mission
בפסוק יאסף אהרן אל עמיו כי לא יבוא כו'
On the verse "Aharon shall be gathered to his people, for he shall not enter [the Land]" and so forth.
The Sfas Emes opens by citing the verse where Hashem tells Moshe that Aharon will die because he will not enter the Land of Israel, setting up the puzzle of why non-entry should be the cause of his death.
ויש להקשות ממ"נ אי לא הגיע זמנו להסתלק מן העולם וכי בעבור שלא יבוא חיסר השי"ת משנותיו והלא אמרו חז"ל שהקב"ה יושב וממלא שנותיהם של צדיקים מיום ליום כו'
And one must raise a difficulty by way of either-or: If his time to depart from the world had not yet arrived, then was it on account of his not entering the Land that the Holy One blessed be He diminished his years? But our Sages of blessed memory have said that the Holy One blessed be He sits and fills out the years of the righteous from day to day, completing them in full. And on the other hand, if his time had arrived, then no reason such as "for he shall not enter" is needed.
He poses a two-pronged objection: if Aharon's appointed lifespan was not yet up, it seems unjust that being barred from the Land would shorten it, since the Sages teach that Hashem completes the righteous person's full allotted years; but if his time was already up, then citing his non-entry as the reason is superfluous.
ואי הגיע זמנו אין צריך לטעם כי לא יבוא
And if his time had indeed arrived, there is no need for the reason "for he shall not enter" at all.
This restates the second horn of the dilemma sharply: had Aharon's natural span simply ended, the verse would not need to give "he shall not enter the Land" as an explanation for his death.
אבל באמת זמנו של אדם הוא כשכבר פעל בעולם העבודה שנצרך לו לתקן ולקיים המצות השייכים אליו
But in truth, a person's time is when he has already accomplished in the world the avodah (Divine service) that he was needed for, to rectify and to fulfill the mitzvos that pertain to him.
The resolution: a person's true "time" to leave the world is not a fixed calendar date but the moment he has finished the spiritual work and mitzvos uniquely assigned to him in this world.
ולכן ביקשו משה ואהרן לכנוס לא"י לקיים מצות התלוין שם ולכן אם הי' מוכן לכנוס לא היה זמנו להסתלק עדיין רק כי לא יבוא וממילא כבר שילם עבודתו כנ"ל:
And therefore Moshe Rabbeinu and Aharon sought to enter the Land of Israel, in order to fulfill the mitzvos that are dependent upon being there; and therefore, had he been prepared to enter, it would not yet have been his time to depart, but rather only "because he shall not enter" — and consequently he had already paid out his avodah in full, as stated above.
Because Moshe and Aharon longed to enter the Land precisely to perform the mitzvos that can only be done there, their work was not yet complete; thus it was not their natural time to die, and only their being barred from entry — which removed the remaining work they yearned to do — meant their avodah was now effectively finished.
Summary: The Sfas Emes addresses why the Torah ties Aharon's death to his being denied entry into the Land of Israel. He raises a dilemma: either Aharon's lifespan was complete, making the reason "he shall not enter" unnecessary, or it was not complete, in which case it seems wrong that non-entry should cut his life short, since Hashem fills out the years of the righteous. His resolution redefines a person's "time" to die: it is not a preset date but the point at which one has accomplished all the avodah and mitzvos entrusted to him. Since Moshe and Aharon yearned to enter the Land in order to fulfill the mitzvos dependent upon it, their service was still unfinished; only because they were barred from entering did that remaining work fall away, so that their avodah was thereby completed and their time to depart had come.