Good advice above. We're not doctors here, and even if we were it would be folly to diagnose over the internet.
Taking pills to mask pain is like removing a smoke detector during a fire.
Rest and recover. Remember the acronym RICE: Rest, Ice, Compression, Elevation.
Be flexible and listen to your body. Battle plans never survive first contact with the enemy.
For future trips, a good tip I use is to train to 30% of the needs of the trip. For my last big trip, my goal was to cycle 600 miles per week, an ambitious pace for me. I "trained up" from my normal 100 miles per week to 200 miles per week (over the course of half a year), and it went exceedingly well.