Glock (17 or 34) and Smith&Wesson (M&P9 or 9L) are options. STI would be best, but out of your price range. Stick to 9mm for 3gun, unless you shoot some other pistol sport (like USPSA) where a bigger caliber might make sense. If you are keeping the XD 45 then another XD would make switching between them easier. Regardless, get magazine extensions, should be +5 in 9mm, and legal for USPSA or most IMGA-based matches.
4 or 5"? For a dedicated competition gun, the extra length helps a little with velocity and sight distance, but trigger and grip feel are more important.
Where did you shoot the match?