Just a clarification, TSP contributions are before tax. Federal taxes have never been paid on the contributions.
If box 7 is coded 2, it is an early distribution, exceptions to the early distribution penalty apply. So, for federal, the distribution is taxable but you are not subject to the 10% early withdrawal penalty.
However, PA does not follow federal rules. PA taxes have been paid on your contributions into the TSP. For early distributions, the distribution is taxable to the extent that the distribution exceeds your basis in the plan. Essentially, if you contributed $100K into the TSP over your career (not counting agency match) and you withdraw $150K, the first $100K you withdraw is a return of your already taxed contributions. The remaining $50K is fully taxable on a PA income tax return. The program should query you for your basis in the plan.
If you had waited until 59.5, the box 7 would be coded 7, which is fully exempt from PA income tax.
I've attached an excerpt from PA PIT Guide Chapter 7 that covers taxability of retirement plan distributions. Finding your basis in the TSP will be the challenge. You may need to contact the TSP.