It is a spiritual purity for all men and women in Christ. They remained faithful to Christ, and were not fornicators with other gods like the pagan idolators were. The 144,000 was the symbol of those converted Jews of the first generation, the first fruits to Christ of the twelve tribes of Israel x the twelve apostles of Christ who were martyred under the persecution.
2 Cor. 11:2,
"For I am jealous over you with godly jealousy: for I have espoused you to one husband, that I may present you as a chaste virgin to Christ." (KJV)
Adam Clarke's commentary on vs. 4,
"These are they which were not defiled with women - They are pure from idolatry, and are presented as unspotted virgins to their Lord and Savior Christ. See 2 Corinthians 11:2. There may be an allusion here to the Israelites committing idolatry, through the means of their criminal connection with the Midianitish women. See Numbers 25:1-4; Numbers 31:16." Source: here
Excerpt from Eldicott's Commentary on vs. 4-5:
"(4, 5) These are they . . .—The characteristics of the servants of the Lamb are given in this verse and the following. The first is purity: they are virgins. The expression can hardly be limited to the unmarried, as the 144,000 represent the wide society of the choice ones of God. They are those whose hearts have been made as the hearts of little children (Matthew 18:1-4), who have that purity of heart which Christ declared to be blessed, and which St. James declared to be the first mark of heavenly wisdom (Matthew 5:8, and James 3:17). " Source: here
The sense is that they were pure, bonded in marriage to Christ, and not committing adultery / fornication with idolatry, nor worshiping idols.