Any 1.9 XUD engine will fit ...eventually, but there are a number of differences. Firstly check the camshaft, some have a drive taken from the end for a vacuum or power steering pump. Also aircon type are different from non aircon as the alternator is in a different place. The best advice I can give is to take some photographs of your engine to check against your potential replacement. One from a conventionally sprung car may not have provision for mounting the hydraulic pump.
would in not be easier to repair the old one, presumably if you cooked it it will need a head gasket and a skim, better the devil you know unless the damage is worse than just the head