So in the US, near a major city, you'd be able to go into a local passport center (for example, here's the one in NYC:
https://travel.state.gov/content/pas.../new-york.html) and get a corrected passport same day. They frequently help people who have lost their passport or have to travel suddenly and need a new passport. Does your country have something similar? I'm guessing by your itinerary that you're not in the US.