The earliest known Scriptural manuscript in which it appears is the Codex Washingtonianus (third-oldest Bible), dated to the late 4th/early 5th century. Interestingly enough Jerome would have been working on the Vulgate at a similar time to this; the Vulgate does not contain the doxology.
The King James Bible and a small selection of other translations use transcriptions from what is commonly known as the "Textus Receptus" - a full version of the Bible based upon a collection of manuscripts that includes the Codex Washingtonianus. Out of the two different collections of manuscripts, this collection is known as the Majority text, and indeed the majority of manuscripts seem to correspond with this, having obviously been transcribed initially from an earlier version back as far as the Washingtonianus, as far as we can tell.
The Vulgate (and its English version, the Douay-Rheims), and many other translations (eg. NAB, RSV, etc) use a different, smaller selection of transcriptions that include the codex Sinaiticus (oldest Bible). Known as the Minority text. When non-Catholic Christians reject these translations (and NOT all non-Catholic Christians DO reject these translations) they do so on the basis of i. speculation (based, I think, in Origen's work) that the Alexandrian texts are less reliable; ii. some redaction technicalities; iii. there are less manuscripts that correspond with this translation.
On the one hand, the fact that the Didache contains this doxology is interesting; this could be a deliberate allusion to the original text of Matthew, if one believes that the doxology WAS contained in the original text. Bear in mind, whether Jesus said these words or not is actually irrelevant here (some pious Protestant scholars of the 19th century seem to momentarily forget their academic objectivity when they speak about this) - what is disputed is whether or not the original Evangelist PENNED these words here in the first place. At any rate, the presence of these words in the Didache could potentially support their original presence in Scripture.
On the other hand, the minority text DOES take from the oldest manuscripts that have been discovered. That manuscript represents the Bible as it was in that time to that group of people (Egypt) and that time predated any mention of the doxology.To write off a discrepancy as a mistake made by an unreliable scribe is NOT an answer. Such a response is to posit a theory for which only a conclusive proof against it can be found. A conclusive proof FOR this theory can never be produced, and therefore we cannot accept it as fact. The whole thing just becomes moot.
And so, the scholarly search continues...