The Yanmar 6LP series is the boat version of the Toyota 1HDFT engines. They are amazing engines.
However, to run it in a truck you will need to make changes, such as adjusting the injection pump professionally to your application. Also the intake manifold is completely different in the boat version, the water line routing is different, and many small parts are not the same. You will likely be missing a pulley too, probably there is no A/C system, and the engine mounts are different. The valve cover is more similar to the 1HDFTE, and so is the gasket. The pistons themselves have a slightly different shape on top, but you can ignore that. Your injection pump likely does not have an rpm sensor either.
Anyway, it can be done, and the engines are great.