During the Health Insurance interview, enter the months you had health insurance coverage. Later in the interview, TurboTax will ask Did anyone have a situation that waives the tax penalty for being uninsured? One of the choices under Wasn't required to get insurance is "Spent time in Jail".
Anyone who was incarcerated during 2016 is eligible to have the tax penalty for going without having insurance waived for any month in 2016 that they spent at least one day confined to a jail, prison, or similar penal institution or correctional facility. Any time spent in jail waiting for trial, or before being convicted, does not apply.
When you check "Spent time in jail" and click Continue, TurboTax will prompt you to Select the months that you spent time in jail. (Click the screenshots below for reference.)
Can I get a health insurance penalty exemption?
https://ttlc.intuit.com/replies/4234967