1099R

We took a hardship withdraw from the 401K.  we were told there should be no penalties.  We took out just over $300,000.00 and had federal taken out.  We took the money to purchase land to build our primary residence.  Now when I put the info from the 1099R it showed we owed $80,000 in federal taxes now.  We can not pay that.  I must have entered something wrong.  Freaking out over here!