1) Matthew 1:1-17, and
2) Luke 3:23-38 (in addition to several other new testament references: Mark 10:47, Luke 1:32, Acts 2:29-30, Rev. 5:5, 22:16).
The Matthew 1:1-17 and Luke 3:23-38 accounts differ because, Luke follows Mary's lineage (Jesus' blood mother), through David's son Nathan (Luke's genealogy focused on Jesus' descent from God through the virgin birth. It placed no emphasis on Jesus being the descendant of king David) and the Matthew genealogy follows Joseph's line (Joseph being the legal father of Jesus, see below) through David's son Solomon.
God's promise to David was fulfilled because Mary was the biological parent of Jesus.