Run some searches for diesel generator here, on google, ebay, etc. There are economical units available.
This is just my opinion and I may be wrong:
The one you build will not work as well as a manufactured genset unless you overcome several technical challenges. The time, effort and money you expend will surpass what a manufactured genset will cost. This is fun to think about, research and talk about, but building it would be the application of misguided energy.
If you want to run a one-man research and development project, proceed. If you want to make electricity from diesel fuel (etc ), buy a genset.
Mercedes diesel as a genset engine
WVO generator powerplant
There are more threads on this topic