"I am going to stay for three nights."
Translation:Je vais rester trois nuits.
Because it is superfluous.
"Je vais rester trois nuits "→ "I am going to stay three nights"
expresses the sentence perfectly. You must stop thinking in and translating from English, though, in this instance, literal translation is on your side as long as you don't weigh it down with unnecessary excessive English prepositions.
It is not French. Unfortunately for language learners, English and French prepositions do not correspond very well. "Pour" does not follow rester.
Here is a useful list of verbs and their prepositions. Keep in mind that sometimes more than one preposition can follow a verb but the meanings may be different.