No. The Green Card process is completely independent of the H-1B, and can be done whether or not you are in the United States. Once the paperwork is approved, you can simply use consular processing to get an immigrant visa and return to the USA. Once you have been physically outside the USA for one full year, you can also get a new H-1B for another maximum of six years.