If you were married to a US citizen and the US citizen died, you can still get your greencard.
Widow(er)s of Deceased U.S. Citizens
If you are the widow(er) of a U.S. citizen, a recent change in the law may affect your ability to immigrate. Section 568(c) of Public Law 111-83 amended the Immigration and Nationality Act so that you may be eligible to immigrate, even if you and your deceased spouse were married for less than 2 years when your spouse died. This change took effect on October 28, 2009, when the President signed the new law. As a result, you may now file Form I-360 for Special immigrant classification as a widow/widower, even if you were married less than 2 years when your spouse died.
You must still file your Form I-360 no later than 2 years after the citizen’s death. If your spouse died before October 28, 2009, however, and you were married for less than 2 years, you can file a Form I-360 for Special Immigrant Classification as a widow/widower, so long as you do so no later than October 28, 2011.
Your eligibility to immigrate as the widow(er) of a U.S. citizen ends if you remarry before you immigrate.