You may retire but you are still contractually obligated as the joint sponsor. The I-864 is a binding contract with the federal government, so you should consult with an attorney to advise you on what it means if you have doubts.
This information is not intended to create an attorney-client relationship, as the information provided is extremely limited and without the benefit of having all facts available.
You can retire. This, however, would not absolve you of the responsibility under the contract.
The information contained in this answer is provided for informational purposes only, and should not be construed as legal advice on any subject matter,not should it be viewed as establishing an attorney client relationship of any kind.