Interesting problem. I'm not intimately familiar with the KA engine, but am pretty familiar with the SR. Nissans of the same vintage use similar parts, so I'm going to throw out some ideas.
First of all, the problem kicking in at 3k is interesting because the ECU has a limp mode that keeps the engine from revving over 3k. Are you running a modified ECU? Is it a JWT? If so, you may want to call JWT. Chances are they will have a good idea what is going on.
Have you tried another ECU?
Have you modified your ECU in any way (besides getting a JWT)?
Other things to consider:
Bad MAF
Bad TPS
Does the KA have a power transistor?
When you replaced the distributor, did it do exactly the same thing or did it change?
The crank angle sensor is in the distributor of the KA isn't it?
My money would have been on the distributor. But, since you changed that (assuming the exact same symptoms), I would look towards the ECU, MAF, or Power Transistor (if it has one).
If you haven't tried a new ECU, I'd do that first.
------------------
George Roffe
Houston, TX
84 944 ITS car under construction
92 ITS Sentra SE-R occasionally borrowed
http://www.nissport.com