If you leave your job for any reason and lose your job-based coverage, you can choose to buy coverage from the Marketplace. This is true even if you leave your job outside the annual Marketplace Enrollment Period.
https://www.healthcare.gov/have-job-based-coverage/if-you-lose-job-based-coverage/
You may be able to keep your job-based plan through COBRA continuation coverage.
Penalties:
https://www.healthcare.gov/fees-exemptions/fee-for-not-being-covered/