On a 2005 Dodge Ram 1500 with the 4.7L V8 engine, the EGR valve is typically located on the intake manifold,
on the passenger side of the engine. It's usually fairly close to the back of the intake manifold, near the firewall. However, exact location can vary slightly depending on specific engine configuration.
To be absolutely certain, you should consult a repair manual specific to your year and engine. A visual inspection with the engine bay open and potentially using diagrams from a repair manual will help you pinpoint it.