The term virgin in those parables are used to spiritually represent the bride of Christ the church. She, as the temporal (that seen) is not reckoned as male and female, and not Jew or Gentile is in respect to the new eternal creation (not seen) but is reckoned as the mother of us all.
Mary was used to typify that not seen, the bride of Christ as the segregate mother of us all in respect to those who hold out the gospel, the incorruptible seed of God’s word by which all men are born again from above. Paul is shown as a mother that suffered as in birth pains until Christ, through the gospel until the Holy Spirit (Christ) is formed in those who mix faith in what they hear..
In parables the scriptures refers to two kinds of women to represent two kinds relationships. The strange woman or bond woman representing all who do not have the Spirit of Christ. The bride of Christ, are shown by a number used as a metaphor no man could count. The bride of Christ as that not seen, the freed woman represented by virgins who have not fornificated after other gods .keeping the first commandment.
As new creatures we are not considered as those who fortification with the gods of this world and therefore make the first commandment without effect.(the strange woman) The virgins are used to represent the bride of Christ as the mother of us all. Some take the literal interpretation and turn that portion of scripture into men that did not have sex with woman, rather than apply the meaning of the parable.
And they sung as it were a new song before the throne, and before the four beasts, and the elders: and no man could learn that song but the hundred and forty and four thousand, which were redeemed from the earth. These are they which were not defiled with women; for they are virgins. These are they which follow the Lamb whithersoever he goeth. These were redeemed from among men, being the firstfruits unto God and to the Lamb. Rev 14:3
The virgin bride of Christ, the church which is made up of many lively stones that make up the spiritual house of God as the temple of God in reference to the mother of us all, she is shown in Revelations 12.
Rev 12:1 And there appeared a great wonder in heaven; a woman clothed with the sun, and the moon under her feet, and upon her head a crown of twelve stars:
And she being with child cried, travailing in birth, and pained to be delivered. And there appeared another wonder in heaven; and behold a great red dragon, having seven heads and ten horns, and seven crowns upon his heads. Rev 12:3
She as the bride of Christ is also shown in Genesis 3:15 ( travailing in birth, and pained to be delivered). Just as with Paul acting as a segregate mother and Timothy when Paul held out the gospel, the incorruptible seed by which all men are born again from above.
My little children, of whom I travail in birth again until Christ be formed in you,
Gal 4:19
And I will put enmity between thee and the woman, and between thy seed and her seed; it shall bruise thy head, and thou shalt bruise his heel.Unto the woman he said, I will greatly multiply thy sorrow and thy conception; in sorrow thou shalt bring forth children; and thy desire shall be to thy husband, and he shall rule over thee. Gen 3:15