What did Moshe mean when he said that Hashem punished him 'because of them'?
Ramban: He meant either that the episode with the rock, which ended with his being punished, was the result of their quarrels (with Hakadosh-Baruch-Hu) or that he needed to strike the rock twice (not in accordance with Hashem's instructions 1 ) due to Yisrael's doubts. 2
Seforno: He meant that his punishment not to enter Eretz Yisrael (which they caused) was meted out to him in order to facilitate sending their children into Galus 3 and shed genuine tears, annually - to bear the full brunt of the sin of the Meraglim. 4 And this would have been less severe had Moshe entered the Land together with them. 5
Da'as Zekenim, Hadar Zekenim, 6 : When we said 'will we take water for you from the rock', you thought that I [said this incredulously, for I] thought that water will not come, I should have explained that Hashem commanded so. Hashem was angry with me, i.e. due to you.
Why did Moshe mention his own punishment, seeing as he was only concerned with issues that concerned the community at large, and even though it only took place at the end of forty years in the desert?
Ramban #1: He was reprimanding them for causing not only the barring of their entry into Eretz Yisrael, but also his own. And he was making a point here of mentioning the punishment of all those who were barred from entering the Land.
Ramban #2: He did so in order to mention Yehoshua 1 who would replace him as the new leader and who would take Yisrael into Eretz Cana'an, since he was being punished by means of a decree forbidding him to cross the Yarden.
Seforno: Refer to 1:37:1:2.
In the following Pasuk.