Romans 8:29 KJV
For whom he did foreknow, he also did predestinate to be conformed to the image of his Son, that he might be the firstborn among many brethren. (This verse uses Foreknow - having seen in the future)
God hath not cast away his people which he foreknew. Wot ye not what the scripture saith of Elias? how he maketh intercession to God against Israel, saying,” (This verse uses Foreknew - having known in the past)
Foreknew is the past tense of the verb Foreknow - https://www.collinsdictionary.com/us/dictionary/english/foreknew
The NIV translation is incorrect.