A 400hp 5.2, is gonna cost you.
They were rated 230hp from the factory.
From that truck 5.2;
the only major parts you can reuse are the block, the crank and maybe the rods. The rest will have to go.
And the final result; a 400hp 5.2 is not very streetable.
Even taking a 5.9 or an LA360 out to 400 is not cheep. If going this route the LA can fall together at about 10.5 or more with the Alloy heads you will want to run.