Well, our hormones will fluctuate with weight changes, either gaining or losing (as in it can make our cycle longer). BUT, there may be other things going on. Maybe you can't lose weight easily and gain easily because of underlying factors that ALSO Contribute to the lack of period. PCOS is one as is hypothyroidism. With these, extra weight is common and lack of period is also common.
I would get a full physical. I would discuss your caloric intake and find a healthy way to eat a balanced diet with the right amount of calories (plus the right amount of physical activity) to maintain good health, have some blood work done to check hormone levels and your thyroid.
Calories really don't determine if you get your period or not. You most likely have other things going on. good luck