According to the Biblical record, Jesus was conceived in the Virgin Mary by the Holy Spirit (Mat 1:18-25; Luke 1:26-38). Legally, because Joseph was betrothed and later married to Mary during these things, Jesus was his son. The NT clearly indicates Mary was a virgin at the time of Jesus' conception (Luke 1:34) and birth (Mat 1:25).
Mary, the mother of Jesus was a virgin when she conceived by the power of the Holy Spirit.
Joseph was Jesus' father in the sense that he was the caretake of Jesus and the husband of His mother, but in no way is there the biological connotation.