Retirement tax questions

Not sure if I'm asking the question the correct way but, I'm having difficulty entering a ROTH distribution.  In early 2018, (prior to April 15th) , my wife and I contributed $13000 each to ROTH IRAs for 2017 & 2018.   Unfortunately, at the end of the year an emergency situation required that I we take almost all the funds back out of the ROTH.  I have received 1099Rs with code J for $11022 & $12512 respectively.  Since these were obviously after tax contributions, we should be able to back the contributions out without tax consequences as I understand it.  However, I can't figure it out on Turbo Tax.  It has the majority of the distribution as taxable.  What am I doing incorrectly?