I am on a J1 Visa but will marry a US citizen in December, 6 Months before my J1 expires.
I do not want to apply for a Green Card afterwards, instead I want to go back home to study.
Will I legally be allowed to remain in the States for that?
When a foreigner marries a US citizen in the US, the foreigner's immigration status does not change. So you will be able to remain in the US in J-1 status just as if you hadn't married a US citizen.