Replace the Threshold of an exterior door
You can replace just the threshold. Sometimes it is difficult because the original threshold is screwed to the jambs as part of a complete assembly, or it lies under the door stop part of the jambs, but it sounds like you already figured that part out. 

I would caution you to investigate and fix whatever caused the water penetration (in case there was an additional issue besides the old threshold) and repair any damaged wood underneath before you install it. I assume your new one is aluminum since you mention filling it with spray foam, screw it down well with stainless screws.The screws that come with them are not always the best ones to use.