Physically, the '05 Extended cab has the exact same 6 mounting locations as the '98, so it bolt up no issue.
But there are significant wiring differences from the '05 to the '98; easiest if both are 2wds and 3.0s. (4 cylinders are different between those years, as are 4.0s. And '98 had PVH hubs for 4wd, while '05 had full time hubs. If both aren't same drive, you compound issues).
The other concern is VIN: There are numbers on both the cab and the frame, and they are supposed to match. I don't know how VA treats different numbers.