Hi Filled,
Congratulations on getting the car road registered.
Re Gear Change.
Difficulty getting 1,3 and 5th suggests that the fore/aft cable needs adjusting. This is quite easy, this link explains.
adjust gear cable - ib5If you adjust to far then you will have difficulty getting 2,3 and reverse.
RE using ST170 engine.
This is quite possible, I have done it. But there is more to do than most expect.
I am assuming that you have standard 1.8 with Ford ECU, ford exhaust manifold , standard exhaust downpipe with catalytic converter.
You will need the 1.8 flywheel from the 1.8 engine. You can use the standard 1.8 clutch on that flywheel but I recommend that you get an uprated clutch and pressure plate. The standard 1.8 clutch gives up if you push the 1.8 hard, with an ST170 it will give up and slip more often.
The ST170 has a different engine mount, very similar but it mounts about 1cm away from the standard 1.8 mount point. you can just drill a new hole or use the existing mount hole, not such a big deal, you can't use the 1.8 engine mount with the ST170 engine.
The exhaust will need to be made from scratch or an aftermarket 170 exhaust bought , cut and re-welded. The ST170 exhaust in standard or aftermarket form does not fit in the Sonic engine bay. With some cutting and welding you can probably reuse your existing exhaust back box.
You will need the ST170 ecu or an aftermarket ecu, you will need the st170 fuel pump, fuel pump controller or an aftermarket solution.
If you are using the ST170 clocks or the 1.8 clocks and the ford ecu, you will need a signal adjuster as the ib5 speed signal for the ecu is different to the Getrag speed signal. I am still trying to get this to work properly, but I am waiting for warmer weather to return first. If you have an aftermarket ecu and aftermarket clocks then it will be much simpler.
The ST170 engine and st170 parts will be about 1/3 the total cost, adjusting the exhaust will probably cost as much again , adding an uprated clutch the same again.
This is a very brief summary, if you want to do it then I can try to explain in more detail.