I understand how you feel.
I would like to thank you for sharing your views.
Since you are only 17years old I think you can wait for some more time to gain weight. But do not stop you workouts since it is a good habit.
I would like to tell you being slim is an attribute, not many people are gifted with that. Moreover many people will hit the gym and are struggling to maintain their structure.
Coming to the point being lean or obese totally depends upon the food you take in.
It is good that you are working out. But workout alone will not help you. You will have take enough calories and protein that which helps in building muscle and giving your body a good shape. Generally a muscle gets bulk when there equal proportions of calories and protein.
Try taking a banana 3 Times a day and by a glass of milk 2 Times a day with sugar that you can have with and you may take 4 eggs a day if you are a vegetarian or can take rajma/ soy beans by preparing them as salad. Along with this you can follow routine workout diet chart if you have.
Coming to the workout there are different sorts of workouts such a workouts for endurance, mass, and maintainance.
You'll have to follow the workout that which is helpfully to you in building the muscle and this can be done by your gym trainer.
Coming to the medication that you have mentioned. I suggest you to not to take that medication of you didn't start yet. If you are on already then you may go with it. But use it as prescribed by the doctor