Deuteronomy 32:50
And die in the mount whither thou goest up, and be gathered unto thy people; as Aaron thy brother died in mount Hor, and was gathered unto his people: And die in the mount whither thou goest up, and be gathered unto thy people; as Aaron thy brother died in mount Hor, and was gathered unto his people:
God commanded Moses to go up Mount Nebo to view Canaan and there to die and be gathered unto his people, as Aaron his brother had died in Mount Hor and been gathered unto his people. His death there was to be solitary, with no earthly friend to care for him or to attend him. The command set before him the mystery and solemnity of death, yet he trusted God and submitted. In that trust he entrusted himself and Israel to God's love and mercy.
Being gathered unto his people does not mean that a good person enters eternal bliss immediately at death. If Moses had believed such a passage into bliss, he would not have pleaded so earnestly to be permitted to cross the Jordan. His earnest prayer showed that he still longed to share Israel's inheritance on the other side.