In the genealogy of Jesus as recorded in Matthew chapter 1 and Luke chapter 3, Joseph is the parent listed in His family lineage. But how can that be if God's biological Father is God Himself?
I believe there is a good answer. First of all, the family tree is what was prophesied about Jesus - that He would be from the "stem" of Jesse, David's father (Isaiah 11:1). If you were to look at the family tree, that prophesy would absolutely be fulfilled since Joseph was from that line of descendants and was the parent of Jesus. Women are never reckoned in genealogies, so if it was Mary only who was from the tribe of Judah, there would not be the legal Hebraic record of fulfilled prophecy. It was most important for Jesus' legal father to be from the correct tribe and "stem" of Jesse.
Also, what we must realize is that "biological" is not the key word in question. Instead, "blood line" is what matters to God. And if we analyze the blood line of Jesus, it is not even Jewish at all. It is the blood of God. Why is that? Because scientists tell us that the blood in every human is from the father, not the mother. So, the blood in Jesus was from His Father, the Holy Spirit. And that is what is most important.
So, we see that God covered two necessary requirements: 1) Jesus earthly family was from the tribe of Judah and the seed of David. And 2) Jesus' blood was none other than the spotless, sinless blood of God, never tainted with the sin nature of Adam. And when that holy blood was spilled unjustly, God purchased back to Himself the human race.
Lastly, Mary was also from the tribe of Judah. If you compare the genealogies listed in Matthew 1 versus Luke 3, you will find that they appear different. Matthew says that Joseph was begotten of Jacob. That means Jacob was his natural father. Luke says that Joseph was the son of Heli, which theologians say was Mary's father. But he was not the natural son, only the legal son (or son-in-law), and that is why Luke does NOT say that Jesus was begotten of Heli - only that he was of Heli (calling the son-in-law the "son of" or "of" the father-in-law was a common practice in Hebrew genealogies and was done several times in scripture). So, for legal purposes, Joseph takes the place of Mary in the record of genealogy, even though Mary is also from David's tree.
If you trace back through the lineage, Matthew runs it into Solomon, David's son, and Luke runs it into Nathan, also David's son. So which is correct? Both are correct. This is how the four gospels are written. They each tell the truth from a different viewpoint, and only when we put them together do we get the full picture. Both of the Davidic lines - that of Solomon and Nathan - unite in Zarrubabel by the marriage of Salathial to the daughter of Neri of Nathan's line. So, Jesus became the heir to the rights and privileges of the whole house of David. (There is much more in this particular genealogy study, but this is enough for now).
One thing is for certain, if there had been the least flaw in the claim and genealogy of Christ through Joseph and Mary, the Jews and the heathen both would have found it and brought it to everyone's attention. But it was and still is indisputable.