Green card is completely independent of whether you're in the US. You can get one without ever having set foot in the US, and you can live in the country for 15+ years and still not be able to get one.