The rebuilt is the cheapest way to go,unless the engine's long or short block has a crack you should be able to go ahead & rebuilt it.
My engine has a slight knocking close to what a small diesel engine sounds like,never had any issues since i bought it with 38k on the odo,now it have 73k and running strong as ever.
Figured out 1rst what is the source of the knocking you are talking about and then you can share it with us.
gustavo, did you check your egr valve? there is a nut on the bottom of it, i beleive its a 22mm, if that works its way loose you will get that diesel sound, its a very easy fix
"Engineers believe if it ain't broke, it doesn't have enough features yet"