Generally, you can only amend a prior year return and receive a refund if the amendment is done within three years (including extensions) after the date you filed your original return or within two years after the date you paid the tax, whichever is later.
Per IRS Instructions for Form 1040-X, page 5:
File Form 1040-X only after you have filed your original return. Generally, for a credit or refund, you must file Form 1040-X within 3 years (including extensions) after the date you filed your original return or within 2 years after the date you paid the tax, whichever is later. If you filed your original return early (for example, March 1 for a calendar year return), your return is considered filed on the due date (generally April 15). However, if you had an extension to file (for example, until October 15) but you filed earlier and we received it July 1, your return is considered filed on July 1. The time limit for filing Form 1040-X can be suspended for certain people who are physically or mentally unable to manage their financial affairs. For details, see Pub. 556, Examination of Returns, Appeal Rights, and Claims for Refund.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.