You can't using Turbo Tax online. This election isn't even supported in downloadable TurboTax: https://ttlc.intuit.com/questions/4673908-how-do-i-elect-qualified-opportunity-zone-deferrals-in-turbo-tax-deluxe-2018