First of all remove all myths & misconceptions from your mind about masturbation
In fact, Masturbation is completely normal & doesn't have any bad effect to the body and mind.
Height of an individual is determined by Genetics, Environmental & Nutritional factors and Hormonal
factors (most important the Growth Hormone
secreted by pituitary gland
An individual stops growing in height after the fusion of the Epiphyses (growth plates) of the long bones, which occurs by the age of 19-21 yrs in males.
And as you are still 17.5 yrs old...you may still have a chance of achieving your dream height.
Make sure that you are taking a healthy & balanced diet, exercise regularly & avoid stress.
One more thing...avoid consuming any over the counter medication
which claim to increase height...it may be harmful.
Wishing you Good Health.
Thanks and take care.