Early distributions on Roth IRA?

(This piggy-backs on another question I asked.)  Does the penalty I have to pay for early distribution (before age 59 & 1/2)  of my Roth IRA have anything to do with whether my contributions were already taxed in advance?  My situation is that I needed to pull out quite a bit of my remaining investments, but now I'm paying a hefty penalty in Turbo Tax.  I believe it all triggered when the software asked me for contributions since the inception date, minus early distributions.  Is there any way to legally avoid this, or is that simply the nature of the penalty?