1500-1700 is usualy about what it costs with sending the heads out to be macheined. If a head cracked it will be more. A head gasket wont cause a knocking sound directly(excesive heat will though). That comes from mechanical failure. If you have a rod knock as well as a headgasket than your best bet is to just find a diffrent motor, or a diffrent car. Should be able to find a decent car on craigslist fairly cheap.