The short version is you will need at least 3 months of symptom free time and another EGD to show evidence that the lesion is healed. You would probably benefit from a discussion with an AME who specializes in guiding you through certification issues to ensure everything required is submitted at the same time and you can avoid a deferral.
Quoted directly from the Faa Medical Examiners Guide..:
8.i. Stomach, liver, or intestinal trouble. A history of acute gastrointestinal disorders is usually not disqualifying once recovery is achieved. Many chronic gastrointestinal diseases may preclude issuance of a medical certificate (e.g., cirrhosis, chronic hepatitis, malignancy, ulcerative colitis). Colostomy following surgery for cancer may be allowed by the FAA with special follow-up reports.
The Examiner should not issue a medical certificate if the applicant has a recent history of bleeding ulcers. Otherwise, ulcers must not have been active within the past 3 months. (Item 38 outlines the special studies needed for consideration of persons with an ulcer history).
Item 38: 7. Peptic ulcer. Following is special procedure for ulcer:
An applicant with a history of an active ulcer within the past 3 months or a bleeding ulcer within the past 6 months must provide evidence that the ulcer is healed if consideration for medical certification is desired. Evidence of healing must be verified by a report from the attending physician that includes the following information:
· Confirmation that the applicant is free of symptoms
· Radiographic or endoscopic evidence that the ulcer has healed.
· Type, dosage, and frequency of medication used.
This information should be submitted to the Aeromedical Certification Division, AAM-300. Under favorable circumstances, the FAA may issue a certificate with special requirements. For example, an applicant with a history of bleeding ulcer may be required to have the physician submit follow-up reports every 6 months for 1 year following initial certification. The prophylactic use of medications including simple antacids, H-2 inhibitors or blockers, and/or sucralfates may not be disqualifying. An applicant with a history of gastric resection for ulcer may be favorably considered if free of sequelae.
Note: I am not a physician and this is not medical advice. I have significant medical training combined with good Google-fu. YMMV.