The authorship of James is disputed indeed. I don’t see anything gnostic in it.
Frankly, the very mention of “temple virgins” seems related to the gnostic premise that the temple was inspired by Baal worshippers.
Hebrew worship deliberately excluded women, and the stated reason was that Eve was deceived. (Adam was no prince either)