Do I file a 1040 if I have been in a department of corrections
This isn't a provision of federal law. You might check with your state's Department of Corrections to see if such a benefit exists at the state level.
Someone who's been incarcerated generally has the same tax obligations as other people. See the TurboTax Help article Do I need to file a federal return this year? for filing requirement information.