I don't think so.
With the prior tractors- D17, D19, etc., there was a gas version of the 6 cyl Buda diesel which would drop in.
The 170 gas engine is the 4 cyl AC 226. The diesel is the 4 cyl Perkins 236. I've never done this switch, but I believe the adaptor housing at the rear of the engine is different. I don't know about the radiator. Some time spent searching parts diagrams and numbers should be informative. The hood is different as the exhausts are on different sides. The only thing these engines have in common is that they're both 4 cyl. I'm afraid there could be several unexpected glitches, like the hood.