As Ivy says, a 289 is pretty much a 289. The only exception being the very early ones, which had a 5 bolt transmission pattern that doesn't fit many transmissions. Later Windsors all got the same 6 bolt pattern. For that matter, a 302 block is more or less the same as a 289 also. Later, the 302 got called the '5.0', but again, mighty similar. Same bore, only some very minor differences which don't interfere with parts interchange. Later engines got a roller cam setup, and the lifter bores are a little different, which makes it pretty hard to just drop a roller cam into a 289. It can be done with a lot of machining, or by doing a reduced base circle cam. Some people like to make a big deal out of the extra length of the 302 block cylinders, but it's only about .040 if I remember right, and quite frankly, it means nothing. You can put a 289 crank in a 302, or a 302 crank in a 289 without much fuss. The earlier blocks and cranks use a 2 piece rear main seal. They can be machined to use the newer one-piece seal, if you feel like it. Again, not a big deal.
Your D0 351 heads in stock form (regardless of other letters) are comparable to the ho-hum E7TE heads that got put on every Mustang from 1987 till they dropped the 5.0. (excepting the Cobras which got GT40s for a year I think). The E7 heads can be improved *slightly* with porting, but not enough to make them worth the time or expense. Your D0 heads, on the other hand, have a lot of extra meat in the ports, and can be improved by a real pro to be at least as good as the GT40 heads, possibly even approaching stock GT40P heads in terms of flow, though not combustion chamber efficiency. They're one of the sought-after years for heads, simply because they're probably the very best 'vintage' heads you can get. Assuming yours have not been mangled by someone, they're worth having, or selling, depending on how you feel about them.
This cam business is kind of important. The old style flat-tappet cams will not survive long on modern oil. They took out the ZDDP, which helps cushion the sliding parts of the cam and lobes. If you have a low-lift, wimpy, stock 289 (not Hi-Po) cam, it might work okay for a while, but eventually, it will cause big problems. Additives, or expensive oil with ZDDP in it can help avoid this situation. It would be safe for a stock cam. A high performance cam's additional lift needs much stronger springs to keep the valvetrain in check. Combined with the higher RPMs, and increased friction from extra lift, it gets kind of 'iffy' even on additives. Flat tappet cams are a bit scary for a car you want to actually drive a lot, these days.
Modern roller cams were introduced in '85, I think, for the 5.0 motors. Just a rebadged 302. If your old block is really shot, you wouldn't have to sell it. You could put it into storage. Only a concourse judge would note the different stampings on a new 5.0 block if you used it in your car. All of your 289 accessories would bolt right up, including your 351 heads. You would have to get different valvesprings, and perhaps different pushrods, but the benefit of having a roller cam means better throttle response, economy, and best of all - no worries about all that ZDDP stuff and wrecked lifters/lobes.
So, the takeaway here: 289, 302, 5.0 = Almost exactly the same thing. Heads, timing cover, intake, everything interchanges. They look very much the same, aside from some stampings that are hard to spot without having the engine out of the car. 5.0 is best though, because of the roller cam, especially if you're trying to build on a reasonable budget. It's super easy to find a 5.0 in a salvage yard Ford, and they hardly have any wear on the pistons or cylinders if they're under 200k miles, unless they were abused.
I smile a lot. It makes people wonder what I'm up to...