Jewishness has been matrilinear for millennnia; the exact origins of that are unclear, and have several biblical references. A discussion of this can be found at:
That site refers to the same verses in Deut. that I did and in addition to the incident in Ezra when the Israelites sent the foreign wives and their children away.
NOTHING in either place speaks to Jewishness being matrilinear. In fact the history of the nation is just the opposite per Moses taking a wife from Midian and all of his descendants are counted as part of the nation.
Again it is an invention of Talmudic interpretation.