If you want to change a Sims 4 hair from female to male or vice versa it is actually very simple. Download the file you want to convert and then open it up in Sims 4 Studio by clicking “My Projects”. On the right side click the tab “categories” and then select the box for the gender you want to convert it to and click “Apply to all swatches”. After that all you have to do is save it and move the file to your Mods folder, and it should appear in the game for the intended sex.
Please note that the hair might not look perfect on all head types, because it is designed for a different gender.