Deductions & credits

AGI includes capital gains, including gains from sale of land. Regarding modifications pertinent to ACA:

MAGI modifies your adjusted gross income by adding to it any non-taxable Social Security benefits you receive, any tax-exempt interest you earn, and any foreign income you earned that was excluded from your income for tax purposes. [quote from Kaiser Family Foundation web site].

Since the ACA MAGI adjustments mention no backout for capital gains, it needs to be part of your MAGI for ACA purposes.