D16z6 Swap help. (wont rev past 3k)

Just swapped in a z6 into my 94 cx hatch. Starts fine, runs ok at idle, wont rev past 3k rpms. Timing is correct, Map sensor is good, TPS sensor is good, New distributor, New o2 sensor, p28 ecu is good. fuel pump is good along with the filter. new spark plugs. Engine harness off an 95 ex civic.

It appears the Crankshaft Position Sensor (CKP) has gone, as indicated by a Code 4. This common on Honda distributors with higher mileage. The CKP sensor is unserviceable; therefore, you need to replace the distributor housing. I recommend that you buy a genuine Honda housing and install your old Ignition Control Module (ICM) and coil. Have the ICM tested, because the bouncing tachometer rpm readings can be indicative of a bad control module.