Hi I got infected and went to the science building but after the removal it changed my character from male to female is there a way to change them back to male or is it permanent?
Sex change only happens if you agree to be a science experiment. Parasite removal is it's own separate thing.
But yes, you can change back. Pretty much nothing in this game is permanent unless you want it to be. Visit the succubus workshop in Transylvania for genitalia related needs. Check the Little Shop O' Horrors for other body modifications.