heres some info on both the 4.0 and 3.4.
reliability wise it will about the same. essentially you could get a bad engine on both but the odds should be about the same and there are cases where people have hundreds of thousands of mile on both engines, so it just comes down to how you take care of your car, or you just get the odd one out.
The 1GR-FE is the 4.0 L (3956 cc) version, designed for longitudinal mounting in RWD and 4WD pickup applications. It has a 94 mm bore and a stroke of 95 mm. Output is 236 hp (176 kW) at 5200 rpm with 266 lb·ft (361 N·m) of torque at 4000 rpm on 87 octane, and 239 hp (178 kW) at 5200 rpm with 278 lb·ft (377 N·m) at 3700 rpm on 91 octane. This engine features Toyota's VVT-i, variable valve timing system on the intake cam and a compression ratio of 10.0:1. An updated version of this engine features Dual VVT-i, increasing output to 254 hp (189 kW) and 270 lb·ft (366 N·m) on 87 octane and 285 hp (213 kW) and 289 lb·ft (392 N·m) on 91 octane. Inside, the 1GR uses a taper-squish combustion chamber design with matching pistons to improve anti-knocking and engine performance, while also improving intake and fuel efficiency. Toyota adopted a siamese-type intake port, which reduces the surface area of the port walls and prevents fuel from adhering to such walls. This engine has special cast-iron cylinder liners cast into the block, which are a spiny type to improve adhesion between the liner and cylinder block. With these special thin liners it is impossible to bore the block. In the event of cylinder wall damage (scoring, deep protrusions, etc), the entire cylinder block must be replaced. For increased block rigidity, the 1GR also receives a high temperature plastic insulator/protector, which fills the empty space between the outer portion of the cylinders and block material common to open deck engines. For increased cooling efficiency, the 1GR employs water passages between the bores of the engine. There are two such passages for each bank for a total of four. This reduces cylinder hot-spotting and keeps combustion chamber temperatures more uniform.
The 5VZ-FE is a 3.4 L (3378 cc) engine which replaced the 3VZ-E. Bore is up to 93.5 mm (3.7 in) and stroke is 82.0 mm (3.2 in) while the compression ratio stays the same as the 3VZ-FE at 9.6:1. Output is 183 hp (142 kW) at 4800 rpm with 217 ft·lbf (298 Nm) of torque at 3600 rpm. It has a cast iron engine block and aluminum DOHC cylinder heads. It uses sequential multi-port fuel injection, has 4 valves per cylinder with bucket tappets and features large cast connecting rods, a one-piece cast camshaft, and a cast aluminum intake manifold. It also features an oil cooler and coil-on-plug ignition.