As long as the rim of the hammer nose clears a capped nipple, your best bet may be to just try to live with it. If the rim of the hammer cup is hitting the cap, you may need to bend it.
I’ve bent hammers from sporting locks a time or two, and found it a tricky procedure to get right. You remove the hammer from the lock, clamp it in a fixture such as a vise with smooth jaws, heat the area that needs to be bent red hot with a torch, and then bend it with a smooth-jawed wrench. A MAP torch (with the yellow canister) gets hotter and works better than a propane torch (a nod of appreciation to forum buddy
@Howard Pippin for suggesting that). The other thing is that the amount you need to bend will likely be very small… as little as 1mm one way or the other can make all the difference.
Bending the hammer nose of a sporting rifle left or right is easy this way. The trick is in knowing how far to bend it, and that may take several tries. Bending the hammer nose forward or back, on the other hand, is a whole different can of worms. I found this very difficult to do without leaving deep tool marks in the red-hot hammer. It was also hard to avoid distorting the cup in the hammer nose.
Musket hammers are massive in comparison to hammers from sporting arms, and I have not tried to bend one. You would think the procedure would be the same except for needing more heat and more time, but I can’t confirm that.
One other point concerns replacement parts. It is generally easier to find original US military musket parts than reproduction parts, and the originals are often cheaper. The problem would be with interchangeability… some parts interchange and some don’t, and I don’t know about the hammer on your M1842 replica. However, it might be something to keep in mind.
Again, if your musket works as it is, you needn’t worry about having the nipple exactly centered in the hammer cup. I would only try to bend it if there is actual interference.
Good luck with it!
Notchy Bob