“A people that do err in their heart, & c. These words are not to be found in Nu 14:1-45; but the inspired Psalmist expresses the sense of what Jehovah said on that occasion. “They do always err in their heart”, (Heb 3:10). They are radically and habitually evil. They have not known my ways. God’s “ways” may mean either his dispensations or his precepts. The Israelites did not rightly understand the former, and they obstinately refused to acquire a practical knowledge—the only truly valuable species of knowledge—of the latter. The reference is probably to God’s mode of dealing: Ro 11:33 De 4:32, 8:2, 29:2-4. Such a people deserved severe punishment, and they received it. So I sware in my wrath, They shall not enter into my rest. The original words in the Hebrew are, “If they shall enter into my rest.” This elliptical mode of expressing oaths is common in the Old Testament: De 1:35 1Sa 3:14 Ps 89:35 Isa 62:8. This awful oath is recorded in Nu 14:21-29: “But as truly as I live, all the earth shall be filled with the glory of the Lord. Because all those men which have seen my glory, and my miracles, which I did in Egypt, and in the wilderness, and have tempted me now these ten times, and have not hearkened to my voice; surely they shall not see the land which I sware unto their fathers, neither shall any of them that provoked me see it: but my servant Caleb, because he had another spirit with him, and hath followed me fully, him will I bring into the land whereinto he went; and his seed shall possess it. (Now the Amalekites and the Canaanites dwelt in the valley.) Tomorrow turn you, and get you into the wilderness by the way of the Red Sea. And the Lord spoke unto Moses and unto Aaron, saying, How long shall I bear with this evil congregation, which murmur against me? I have heard the murmurings of the children of Israel which they murmur against me. Say unto them, As truly as I live, saith the LORD, as ye have spoken in mine ears, so will I do to you: your carcases shall fall in this wilderness; and all that were numbered of you, according to your whole number, from twenty years old and upward, which have murmured against me.” The words of the oath seem here borrowed from the account in De 1:35. There are many threatenings of God which have a tacit condition implied in them; but when God interposes his oath, the sentence is irreversible. The curse was not causeless, and it did come. We have an account of its actual fulfilment, Nu 26:64-65. The “rest” from which they were excluded was the land of Canaan. Their lives were spent in wandering. It is termed “God’s rest”, as there he was to finish his work of bringing Israel into the land promised to their fathers, and fix the symbol of his presence in the midst of them,—dwelling in that land in which his people were to rest from their wanderings, and to dwell in safety under his protection. It is His rest, as of His preparing, De 12:9. It is His rest—rest like His, rest along with Him. We are by no means warranted to conclude that all who died in the wilderness came short of everlasting happiness. It is to be feared many of them, most of them, did; but the curse denounced on them went only to their exclusion from the earthly Canaan.”

Link: http://www.spurgeon.org/treasury/ps095.htm