Retirement tax questions

Hi my plan allows early withdraws if you terminate at age 55 or older my 1099r is coded with a 2 in box 7. What option do I choose when doing pa state taxes to get the tax exemption? When I select the early distribution option it makes me enter cost basis. Do I need cost basis if the plan allows early withdrawals at age 55 after retirement? Thanks