I had endoscopy two months ago (gastritis, gerd, h. Hernia). Problems got worse. Is it possible to develop esophagus cancer in that short time?

Esophagus Ca. Occurs in people that smoke and drink, or are over weight with reflux. The hpv genes are found in some tumors, no clarity of the implication there. It is rare under 40. It is highly unlikely that cancer is the cause of your symptoms at your age. You might seek a second opinion from a medical GI to root out cause.
No, but see your. Doctor to find a cause and effective treatment for your problems, since constant stomach acid in the distal esophagus can lead to an abnormal esophageal lining and could eventually become cancer, but not in 2 months at your age.