Short answer: "Boku" is not exclusively for male use.
Long answer: It all depends on the context and the personality of the person (male or female) that's using it. For example, tomboyish girls often use it to refer to themselves, but just because you're a girl and use it doesn't mean you're a tomboy. Also, because this is a song, there's the added facet of artistic expression - the "rule" you learned doesn't necessarily apply to music/forms of entertainment. Whoever wrote the lyrics might have chosen "boku" because it fit better lyrically, both to make it so both men and women could relate to the song and thus appeal to a wider audience, and because other pronouns may have been harder to fit into the melody/sounded clunky when sung.
Hi. Japanese language learner here but I've only studied in classes so I lack practical application of actually speaking the language. But.....I thought boku was exclusively for males yet they are using it in this song. So females use it sometimes? When and how? I don't need any hate telling me I'm ignorant or racist. I don't claim to have any expert knowledge here. I just want clarification from someone who does speak colloquial Japanese.