To be certain, you should:
1. Consult your owner's manual: This is the best source of information specific to your truck's engine. It may have a diagram showing the location.
2. Use a repair manual: A Haynes or Chilton repair manual for your specific year and model will have detailed diagrams and instructions.
3. Search online for images: Search on Google Images or YouTube for "2004 Dodge Ram 1500 oil pressure switch location [your engine size]" This might show you pictures of the switch's location on similar trucks.
Keep in mind that working on your vehicle's engine can be dangerous. If you're not comfortable doing this yourself, it's best to take it to a qualified mechanic.