I wondered the same thing at one point but gave up because of the same reason… too much conflicting information!!
The Oxford dictionary says it comes from Old English wǣrloga meaning ‘traitor, scoundrel, monster’.
I found an account by someone who went deeper into researching it. Nicholas Johnson on Medium.
In short, he says that Warlock became a synonymous with ‘magician’ or ‘sorcerer’ or ‘male witch’ after the emergence of Hollywood and pop culture.
Before that, Christian authors used the word and meant a traitor to Christianity or to Jesus. ✞
Another version says that it simply means oath-bound, one who has taken a sacred oath of service or one who officiates over sacred oaths such as weddings. Incidentally this is the same etymology from which we get wedlock.
Yet another Old Norse source could be Varth-Lokkr, (one who locks or enclose) meaning someone who binds spirits.
In summary, there’s no straight answer. The word “witch” is gender neutral and has been as long as it has been in the English language. So that’s good enough for me!