With difficulty - because generally speaking, once sold to you the manufacturer warranty will not be any good because it is now a "used" item - especially if unpacked and installation began, and most especially if it has been recorded with the manufacturer as "sold" or warranty info has been filed with them.
You might be able to sell it on Craiglist or a local equivalent - the safe payment issue you could solve by going to their bank with them before turning over the furnace and having them get a cashier's check made out to you - but HAS to be done in your presence so you see that the check itself is actually prepared by the bank and given direct to you, not just something the guy brought to you which might be fraudulent. Then back to your house (or your vehicle if big enough to hold the furnace) for him to take possession.
Another thing - you do not say whether you paid for the furnace or not - is there a possibility that the contractor will file a lien against you for its cost (with his profit and markup, which can be commonly 50-100% and sometimes more - I have seen 400% markups on HVAC equipment.
And of course, if selling to a third party, he is not going to buy it for way over competitive price - so you will recoup something like wholesale or maybe retail price, not contractor marked-up price.
Possibly safest thing and the way to get ALL your money back - return it to the dealer (he comes gets it or you take it or you pay a Mover or Hauler $100 or so to take it to him with you driving there for the paperwork /refund side) for refund of your money, with invoice showing returned for full refund if a dealer - or for invoice showing refund amount AND a lien release from him - and from the vendor if the furnace did not come from his stock, because a dealer / wholesaler can file a lien on your property if the contractor did not pay THEM. If he will not take it back and refund the money, then probably your only recourse is to file a small claims court case against him, or file a claim with his Bonding company for refund - but since you already had the job done by another contractor the normal recourse of them having another contractor finish the job has been lost, so you may have lost that possible recourse.
You did not say HOW the contractor was unscrupulous - but sounds like time for a D or F Rating and truthful but blunt Review on AL if you really believe that - and such a low rating will result in AL contacting you about the issue.
If you want an outside opinion on whether his actions were really unscrupulous or not before you do a review or such, you can post more info on the specifics of the case here fort contributors to eyeball and give an opinion on whether this was likely attempted fraud, a shady contractor, perhaps a misunderstanding about scope, or perhaps a misunderstanding on your part about standard contractor practices. To do so, use the yellow Answer This Question button right below your question to post info.