Speak not thou in thine heart, after that the LORD thy God hath cast them out from before thee, saying, For my righteousness the LORD hath brought me in to possess this land: but for the wickedness of these nations the LORD doth drive them out from before thee.
Don't say in your heart that it's because you are righteous that God has let you take this land; rather, understand that God is removing the wicked nations to make way for you.