According to the Bible, God created Adam from dust and dirt. Which means that he would have created the genetic material and added it to the figure that he had formed. Which is to say that God can simply add all of the necessary genetic material to anyone (and even, in Adam's case, anything).
There is nothing that would prevent God from doing the same with Jesus. The concern that this would somehow invalidate the lineage does not take into account that God miraculously inseminating a woman already invalidated the lineage, in the technical sense. But if the lineage was just a way of identifying the Messiah, then it works no matter how his DNA was structured.
Unless we think that the same God who breathed the universe and all of its complexity into existence was somehow baffled over how to handle inherited sin when he transferred a part of himself into a human form.