Toyota doesn't change Eng. to Trans. flanges for no reason - it's been Std. fare
for a long time.
My monies say Yes - a 5.4 will bolt into a 4.7 engine bay and bolt to the existing
transmission using the 4.7 flexplate / convertor.
The engine bore centerlines are the same - but the cylinders are 'siamese'd - which tends to develop 'Hot Spots' - not great for High Performance.
Should you scrape up a cylinder bore - the 5.7 block cannot be 'over bored' - the block is now junk - you cannot 'sleeve' these blocks.
The big changes from the 4.7 to the 5.7
are the use of Timing Chains instead of gears between the cams and Chains instead of a single Timing Belt - the Bore is the same 94mm as the 4.7 - the Stroke has increased from 3.31" to 4.02" - can't tell you about the cam specs as yet.
The cylinder block 5.7 is all Alum. - the 4.7 is high quality compressed graphite cast Iron , same material used in the NASCAR race engine cyl. blocks.
The VVT-i added 40HP to the 4.7 in '05-'06 with a boost in Torque specs as well.
The big question is the ECM controller for the 5.7 - as your 4.7 is not VVT-i technology.
Did the '05 - '06' VVT-i 4.7 use the same transmission as your '02 ? No.
You might look into having the 5.7 ECM reprogrammed for your transmission - feasible - but if you run across a 5.7 Engine / Trans. combo - then you'd be set.
www.Lextreme.com
Read here on the 4.7 engines - which I prefer over the 5.7, as they Rev quicker, have gears between camshafts and a single Belt rather than huge flailing timing chains heating and churning air bubbles into the Engine Oil.
The 'failings' of the 4.7 - only two - show up when people want 'more' from their engines - and add a Turbo or Supercharger without addressing the 'skinny' Powder Forged connecting Rods and Cast Alloy Pistons.
Toyota used these 'skinny' rods to lower the reciprocating weight - making the engine 'Rev Happy' - but - they are not designed to support Turbo / Supercharging - which is why TRD stopped offering Supercharger kits for these - rods were blasting holes in the block.
Replace the rods / pistons with the Forged units offered on
www.Lextreme.com, use ARP bolts everywhere - and you're good to go for Forced Induction making 'crazy' HO / Torque.
I personally would use Turbo rather than Superchargers - as Aux. belt driven superchargers add wild 'Harmonics' to the crankshaft which hammers the bearings - and - Superchargers 'heat soak' an engine.
Use the JBA Stainless Steel Headers and put the Turbos at the ends of each - or - check
with Cowboy Bebop for a set of his forward facing headers he's making for 4.7 engines into SUPRA swaps - which will put the Twin Turbos forward of the engine - easier to plumb into an Intercooler that way.
The 4.7 has large intake ports - they are fine as they are - you could have the Manifold and runners Extrude Honed.
The cams are 'Torque' cams - again, fine - and do not need to be swapped out when adding a Turbo Kit.
I would pull your '02 4.7 out - put in Forged Internals - new water pump and Belt along with Timing Belt support items - install a Turbo or Twin Turbos - use a variable BOOSt controller so you can run around town on 8.5 or 9.5 pistons and spin up to 600 or 700 HP with the flick of the wrist.
I'd run a Methanol [windshield washer fluid 50/50] injection system that would kick in at 6lbs. Boost - protect against detonation when making 400 - 700rwHP.
Your next problem will be your Transmission handling 700 HP - IPT - Import Performance Transmission can help you there.
The 381HP 5.7 is an impressive engine - but the 4.7 is the 'choice' engine for a High Performance Build - full circulation of coolant around each cylinder - not 'Siamese'd cylinder bores.
Toyota used the 4.7 as the basis of their Indy efforts for awhile - heads / block / and at times the stock forged crankshafts.
The 4.7 also set track records in Drag Racing for 'Turbonetics' Celica Dragster.
The 4.7 engine block can handle 1,200 HP without modification - show me another stock production engine that has DOHC alloy heads making this amount of power simply by adding rods /pistons with a Turbo!
You've the best Toyota engine or any Engine for that matter, in your '02 for the Classic High Performance Hot Rod Treatment - so get reading 'n Enjoy !
www.Lextreme.com