If your engine sounds like a diesel truck, there can be many things wrong with it, Is it running rough? and is there smoke coming out the exhaust, If you have smoke, check if its white, if it is you've done a head gasket. If its blue its rings, valve stems or valves (but this normally wont make it run rough of choof like a diesel) If not the spark plugs might be fouled up and need replacing, the leads can be done too as these will deteriorate with time.
On the gearbox side of things, You can either buy a 2nd hand one from a wrecker, or ebay. but you might also be able to buy a new gear set. Is it auto or manual? either option isn't going to be cheap however. Genuine will cost an arm and a leg, so if you can steer clear, depending on your car you might be able to find a cheaper after market option, but this still will set you back.