The only thing you need to watch is that the new stem might not be as deep as the old one.
If it's not as high the top cap will tighten onto the top of the steerer tube and not the top of the stem and it won't tighten up. If that's the case you'll need to fit a spacer or cut a bit off the steerer tube, the former being the best option.
Take the top cap off. The top of the steerer tube should be about 3mm below the top of the stem.