Threaded headset or threadless? Steer tube diameter must match the original. Too short will be unusable in any case. Too long, and you can generally use spacers. If threaded headset, the threaded section must extend far enough to hold the headset parts, otherwise you may need to extend the threads (usually a bike shop job, as the tools are fairly expensive for a one-off job).
Handling may differ from the original fork if the rake is significantly different.