Get tested. Inability to gain weight is a non specific sign that something is wrong. You could have a metabolic problem like hyperthyroidism or an absorption problem like celiac disease. You could have something more serious like an undiscovered cancer. See a health professional who will get a more extensive history, examine you and run some tests.