Unfortunately, I have to agree with your CPA.
1. A loss on a personal residence is not deductible, just as gain may be excludable from tax.
2. There is no way to get out of tax on an IRA distribution unless it is rolled over within the 60 day period. Most strategies for reducing tax involve spending money, like making a deductible charitable contribution or an IRA contribution.
Sorry for the bad news.
Please Reply if I can help you further.