David is correct. I restored a D17 Series III several years ago with a 262 ci gas engine, which came out a CII Gleaner. I have seen this done several times when the original diesel engine failed. The 262 gas will bolt right in for the most part. As far as horsepower ratings:
WD45 (226/4cyl gas, 230/6cyl diesel) - 43 hp
D17 (226/4cyl gas, 262/6cyl diesel) - 52 hp
D19 (262/6cyl gas) - 71 hp
D19 (262/6cyl turbo diesel) - 67 hp
The 262 gas is a nice conversion in the D17 diesel. The six really sounds nice when the governors open up - just make sure you have a fuel tanker nearby!