The solution is multifaceted. You need to consult an Endocrinologist,Tanner staging needs to be done, your hormonal assay needs to be done. You need dietary advice along with an exercise to gain healthy weight.
Next Steps
Your target should not be weight. w
Work on your fitness parameters like rest heart rate, your ability to do push ups, your ability to hold a plank, the time it takes you to run a kilometre. If you take care of these numbers. The weight will take care of itself