In the Gospel of John the main concern of the Evangelist (or the community that edited and completed the work) is that “you may believe that Jesus is the Christ, the Son of God” (20.31). Throughout the Gospel he makes it most apparent that this is substantiated by Jesus’ peculiar relationship with God the Father as the Word of God who has come into the world. Jesus’ deeds verify this claim and that is why you should confess Jesus as Messiah.
In contrast to Matthew and Luke we find different responses to allegations regarding Jesus being a child born of fornication and not being born in Bethlehem.
In 7.42 some question whether Jesus could have been the Messiah since the Messiah had to have been born in Bethlehem. The Evangelist is ambivalent to whether this matters or not. He doesn’t clarify that Jesus was born in Bethlehem, but neither is there any suggestion that he agreed with the accusation that Jesus was not born in Bethlehem. Again, I think he has mentioned over and over again that Jesus comes from God. If this is true, does it matter how he got here?!
Likewise, in 8.41 while Jesus and his opponents debate fatherhood (Jesus says that they are not children of Abraham, but Satan in vv. 31-47) the opponents of Jesus state “We were not born of fornication.” This seems to be an attack on Jesus. Who is Jesus to doubt the validity of their relationship to Abraham since he is the result of sexually immorality?! Rather than a virgin conception narrative the Evangelist expects the reader to call the bluff of Jesus’ opponents. Why would they say that when they know very well he claims to have come from God the Father. Now this doesn’t mean that John denied Jesus’ virgin conception, but rather he seems unconcerned with the accusation because in his eyes Jesus’ relation to the Father is enough to rebuff such accusations.
Obviously, we cannot know for sure what John thought about the virgin conception tradition though his logos Christology and later date of composition make me think he was aware of it and affirmed it indirectly. Likewise, we cannot know what he thought of the tradition that Messiah had to come from Bethlehem or whether or not he thought Jesus did come from Bethlehem. What we do seem to know is that he felt that these matters were secondary to who he knew Jesus to be.