To be qualified for medicare, you need to be at least 65 year ol
meet at least one of the following requirements
- you are eligible to or currently receive Social Security benefits
- you are eligible or currently receive railroad retirement benefits
- you and your living, deceased, or divorced spouse worked a qualifying amount of time in a government job in which Medicare taxes were paid or you're a dependent parent of someone who worked a qualifying amount of time in a government job in which Medicare taxes were paid.
Therefore, it's not true that you can get medicare as long as you have been green card holder for 5 years.