You cannot travel on J-1 especially after you marry and apply for adjustment of status.
Your option is to marry now in court, apply for AOS immediately (with application for Advance Parole I-131) and hope you get it before your travel.
If you don't have advance parole or green card by the time of your trip, you cannot leave the US.
You can always have a celebration of your marriage in October as planned earlier. You'll be just legally married by then.
Or if you don't want to legally marry until October, you can say goodbye to that trip, it won't happen.
You just can't have it all, unfortunately, due to how restrictive immigration process is.