On a 2005 Dodge Ram 1500, the fuel filter is located
on the frame rail, near the fuel tank, on the passenger side of the vehicle. It's usually fairly close to the rear axle. However, the exact location might vary slightly depending on the engine and configuration of your specific truck. It's often encased in a metal canister.
Because of the potential slight variations, visually checking under your truck on the passenger side near the fuel tank is the best way to be certain. A repair manual specific to your year, model and engine will also show you a precise diagram.