The only question that matters is whether you can get a waiver, and no one can answer that for you online in generalities.
Marrying your US citizen boyfriend will not allow you to remain in the US if you are subject to INA 212e (the 2-year foreign residence requirement). If subject to INA 212e, you are ineligible to adjust status based on marriage to a citizen - or based on any other type of immigrant visa petition - until you have either fulfilled the two-year requirement or obtained a waiver.
The question of whether you can get a waiver begins with the type of J-1 program you have and the reason why you are subect to 212e (and if you are indeed subject - final determination rests with USCIS). The reason why the requirement applies to you may limit the types of waivers for which you might be eligible to apply. This is a very fact-intensive, case-specific analysis, and you should consult an immigration attorney in person, so that counsel can review your passport & Forms DS-2019.
This is general information only. It is not intended as a substitute for legal advice, and does not create an attorney-client relationship.