Your permanent resident husband could always file an immigrant petition on your behalf. You would become eligible to apply for Adjustment of Status as soon as your ‘priority date’ becomes current.
Additionally, you should be able to reclaim any time that you have spent abroad towards your H-1B stay in the U.S.
If you decide on a course of study and obtain admission at an accredited university, you could extend your stay in the U.S. by changing to student status.
You have several options to remain in the U.S. beyond the expiration date of your H-1B. Since this is a general answer and your situation may be more sophisticated and complex than that mentioned in your email, we highly recommend scheduling an appointment the Attorney to discuss your options.