I'm a new christian and wondered if it is safe for me to stop masturbating and having sexual thoughts?

Yes safe to stop. Some christians believe masturbation is wrong, some believe contraception is wrong, to each his or her own. However it will be difficult to stop having sexual thoughts, these are related to your hormones. Good luck.
Safe------Yes. You pose several issues. It appears you are entering a religeous phase of your life. This is important. Your question is confusing regarding "sexual thoughts". It is biological and normal to have "sexual thoughts". It is what you do regarding sexual thoughts and practices that determine health and well being. I recommend you discuss this with your clergy, counsellors and others.
Safe. Safe to stop. Safe to continue. Perfectly natural either way .
Impossible. You will not be able to avoid sexual thoughts, and if this derails your new christian faith commitment, it will be very unfortunate. You are looking at human-made doctrines and rules intended to frighten you. The christian walk, being kind to whoever you meet on the road, forgiving and promoting forgiveness, and refraining from what truly hurts others, should not have an added, impossible burden.