Welcome to HCM.Masturbation
has no ill effects on health or stamina.
It is not because of masturbation that you are not gaining weight, but because of your body constitution. Some people eat a lot more than others but are unable to put on weight, most likely due to poor absorption of digested material from the intestines.
Don't blame masturbation for your lack of stamina and poor weight gain.