"The third and final reference to these liturgical females is in 2 Maccabees:
And the virgins also that were shut up, came forth, some to {High Priest} Onias, and some to the walls, and others looked out of the windows. And all holding up their hands towards heaven, made supplication. (2 Macc 3:19-20)
Here are virgins that are shut up. In the Greek it is "αἱ δὲ κατάκλειστοι τῶν παρθένων" or "the shut up ones of the virgins."
In this passage the Holy Spirit refers not to all the virgins of Jerusalem, but to a special set of virgins, that is, those virgins who had the privilege and right to be in the presence of the High Priest and address him.
It's rather ridiculous to think that young girls would have general access to the High Priest of Israel. However, if these virgins had a special liturgical role at the Temple, it becomes clear that they would both address the High Priest Onias and would also be featured as an essential part of the intense supplication in the Temple at this moment of crisis."
Marshall doesn't say what translation he is quoting from so I can't comment on its accuracy or such but the Catholic bishop approved NABRE and the 1611 edition of the AV with 2 Macc. (Oxford University Press, 1997) reads as follows:
"Women, girded with sackcloth below their breasts, filled the streets. Young women secluded indoors all ran, some to the gates, some to the walls, others peered through the windows 20. all of them with hands raised toward heaven, making supplication."
NABRE 2 Macc. 2:19,20
According to the translation approved for Catholic faithful by the U.S. Conference of Catholic Bishops there was no cloister of virgins in the temple who had face time with the high priest. The "secluded" women were just young women kept in doors.
The original says, in full,
ὑπεζωσμέναι δὲ ὑπὸ τοὺς μαστοὺς αἱ γυναῖκες σάκκους κατὰ τὰς ὁδοὺς ἐπλήθυνον αἱ δὲ κατάκλειστοι τῶν παρθένων αἱ μὲν συνέτρεχον ἐπὶ τοὺς πυλῶνας αἱ δὲ ἐπὶ τὰ τείχη τινὲς δὲ διὰ τῶν θυρίδων διεξέκυπτον
πᾶσαι δὲ προτείνουσαι τὰς χεῖρας εἰς τὸν οὐρανὸν ἐποιοῦντο τὴν λιτανείαν (2 Maccabees 3:19-20)
Dr. Marshall's quote is correct. Here are the dictionary entries for the two operative words:
κατά-κλειστος , ον,A. shut up, of women, Call.Fr.118, cf. LXX 2 Ma.3.19, Luc.Tim.15, Hsch.; οἴκοι κατάκλειστος ἦν D.L.6.94; κ. εἶχεν τὰ βιβλία Str.13.1.54; precious, τίμιον ἢ κ. S.E.P.1.143.(Liddell-Scott - 1)
παρθένος , Lacon. παρσένος Ar.Lys.1263 (lyr.). ἡ,A. maiden, girl, Il.22.127, etc. ; αἱ ἄθλιαι π. ἐμαί my unhappy girls, S.OT1462, cf. Ar.Eq.1302 ; also γυνὴ παρθένος Hes. Th.514; π. κόρα, of the Sphinx, dub. in E.Ph.1730 (lyr.); θυγάτηρ π. X.Cyr.4.6.9 ; of Persephone, E. Hel.1342 (lyr.), cf. S.Fr.804; virgin, opp. γυνή, Id.Tr.148, Theoc.27.65.3. Παρθένος, ἡ, the Virgin Goddess, as a title of Athena at Athens, Paus.5.11.10, 10.34.8 (hence of an Att. coin bearing her head, E.Fr.675); of Artemis, E.Hipp.17 ; of the Tauric Iphigenia, Hdt.4.103 ; of an unnamed goddess, SIG46.3 (Halic., v B.C.), IG12.108.48,54 (Neapolis in Thrace); αἱ ἱεραὶ π., of the Vestal Virgins, D.H.1.69, Plu.2.89e, etc. ; αἱ Ἑστιάδες π. Id.Cic.19; simply, αἱ π. D.H.2.66.II. as Adj., maiden, chaste, παρθένον ψυχὴν ἔχων E.Hipp. 1006, cf. Porph. Marc.33 ; μίτρη π. Epigr.Gr.319 : metaph., π. πηγή A.Pers.613.(Liddell-Scott - 2)