I was going to put this in a comment, but it got too long.
In short, there is no simple answer to this, as it is dependent on a wide range of factors. I will discuss several below...
Tech Level: Specifically, in the ability to create and persist records. If we are dealing with a primitive culture with no written language, then knowledge of their origins would be persisted only through verbal tradition, and would potentially start to drift from accuracy within a few generations. If you are dealing with an advanced culture with digital record keeping and the good sense to make back ups...then millennia down the road, the historical records could still be perfectly viable and flawlessly accurate.
Culture: This largely focuses down to a continuum with "Monastic-level interest in preserving accurate records" to "Totalitarian obfuscation of records" with "Meh" somewhere in between. As a great example of this, compare ancient Mongolian culture with ancient Chinese culture. The Mongols weren't too interested in keeping records and a vast swath of what we know about them is drawn from the records about them written by other cultures. Their histories were primarily verbal, and much of it was lost when their empire collapsed. On the other hand, we have tons and tons of precision details on ancient Chinese culture because they documented and recorded everything. In fact, that's why the Longyou caves in China are such a baffling mystery, because they are one of the few major projects of ancient China for which there are no records. And in a most extreme case, it is possible for a segment of leadership to arise over the settlement that will actively quash teachings of the past (to set themselves up as a god, or brainwash people to their line of thinking, etc)
Catastrophe/invasion: A sufficient catastrophic event can throw the line off in horrible ways. Ridiculous amounts of information was utterly lost when the Library of Alexandria was destroyed. We lost the knowledge of one of the most important civilizations in history (the Etruscans) when Rome rolled in and didn't bother translating anything from the Etruscan language...to the point that even though we have tons of writings from them, no one knows how to read it. Furthermore, a catastrophe can temporarily swing the 'knowledge-preserving' culture of a group towards the 'survival first' side of things, and cause the loss of much knowledge when people start burning the record books just to stay warm. Or, in the case of an interplanetary colonization effort, if the ship fails, and all the nice tech they brought with them is destroyed...they may not have the capabilities to recover. Especially if it is a seed ship, rather than a traditional colonization ship.
So, in short, there is no simple answer. If everything goes 'right' then they may never forget their origins (see: Ancient China). If everything goes 'wrong', they could have completely lost their origins within a few generations.
So, for the purposes of a story you are building a world for...the answer can be 'however long you want,' as long as you mix in the right tech/cultural/event factors to justify it.