The Biblical account of Jesus’s ancestral history is given to us in Matthew and Luke only. Although the Bible isn’t exactly clear on the lineages, there has been much said over the years about accrediting one account of the genealogy to Joseph’s family line and one account to Mary’s family line. If we are going to assume this idea, we can safely pin Matthew’s account on Joseph’s family lineage and Luke’s account on Mary’s family lineage. The reason why I would say that Matthew has given us Joseph’s family line is because of Matthew 1:16:
“Jacob was the father of Joseph the husband of Mary, by whom Jesus was born, who is called the Messiah.”
Throughout Matthew’s account, he uses the Greek word gennaó where ever you see the English word father or fathered. Gennaó means “to beget” when applied to males and “to bring forth” when applied females. The word can be used metaphorically, but there is no logic to that here, when gennaó is used literally throughout the other 15 verses of Matthew’s account. Matthew is straight up telling his readers that Jacob is Joseph’s biological father.
Now look at Luke’s account of the genealogy, particularly Luke 3:23:
“When He began His ministry, Jesus Himself was about thirty years of age, being, as supposed, the son of Joseph, the son of Eli,”
Mary is not mentioned, as women didn’t seem to count (they weren’t included when counting the feeding of the 5,000 or the 4,000, see Matthew 14:21), but we could assume that Eli is actually Mary’s father. The original Greek Septuagint doesn’t say that Eli “begat” Joseph. The Greek word used in Luke for the English word son is huios and it can mean a biological son, an adopted son, a descendant, a subject of a king, or a figurative son (one regarded as a son, but not actually a son). The application of the word is broad. It is important to remember that women didn’t count when recording lineage back then. And, Luke never lists any women in the lineage, just the men.
Another thing to consider is why, if Joseph is not Jesus’s biological family member, bring up Joseph’s lineage at all? We can safely assume that Jesus was adopted by Joseph, whether a full legal adoption or a casual familial-accepted adoption, and adoption came with all the benefits that natural children had, including inheritance. Most importantly, it seems God saw Joseph as a surrogate/adoptive father for Jesus, because of the way He instructed and included Joseph in the information concerning the conception, birth, protection, and the continued care of Jesus (see Matthew 1:18-25, 2:13-23; Luke 2:4, 5, 16, 33, 39-52).
There is proof of some sort of adoption to be considered within Luke 2:41-48 and from Luke 3:23. In these verses, Luke gives us the account of Jesus, at the age of twelve, as He was left behind in Jerusalem after the Passover. Luke uses the two words “parents” and “father” within these verses and Mary herself refers to Joseph as Jesus’s “father” in Luke 2:48. And in Luke 3:23, the Greek word enomizeto is used for the English phrase was supposed. It is a form of the Greek word nomizó which means “to hold by custom or by law”. Therefore, to call Jesus the adopted son of Joseph would make sense.
No matter how we view Matthew’s account or Luke’s account of Jesus’s genealogy, the real importance is that Jesus is God’s Son (Matthew 3:17; 17:5; 2 Peter 1:17) and His work on the cross is the reason why He was born in the first place (Matthew 20:28).