A bicycle may only be ridden because of the peculiar steering geometry. The centre of the contact patch of the tyre is behind the point where the steering axis intersects with the ground. The distance between these points is called trail. In order to visualise it you may have a look at this figure from the bicycle dynamics article on Wikipedia:
The trail is determined by a number of constraints: head angle, wheel diameter, fork rake, fork length.
In general: If trail increases, the bike becomes more stable on straights, if trail decreases the bike becomes less stable on straights.
How will your new fork change your bike's geometry?
A longer fork with the same rake will slightly slacken the head angle, as the bike is tilted a little. This increases trail.
However, it will also reduce trail as the ratio of rake/length becomes smaller. this is not correct
If the fork has more rake, it will very directly reduce trail.
A lose or misaligned headset will cause an unstable ride. You may test your headset as follows, if you have a rigid fork, i.e. no shock absorbers.
Stand beside your bike hold the bars, and pull the forward brake levers. Your brakes should lock the forward wheel. Then rock the bike fore and aft. Do you feel any give, any instability? Push down on the handlebars and force the bike fore and aft. Turn the wheel sideways and repeat.
Anecdote: I had an unstable bikes for years. I found only out when stripping it for parts that I confused the top and bottom ball cages of the headset bearings. The lower one led to a slightly too tight fit, the upper one was slightly too large. I never could really tighten that headset properly.
The original poster mentioned in the comments that their problem was caused by a similar mistake: "[I] realized that i had my bearings upside down."
Warped frame, damaged head tube, cracked frame
If a collision was strong enough to render your fork unusable it might have damaged the bike's frame. Some points you might want to check:
are there any cracks at the head tube? Did paint flake off recently?
Are head tube and seat tube parallel. Are head, seat, top, and bottom tube in one plane?
do you hear any creaking noises when cycling?
Bad dish of your rear wheel and a warped frame may cause bad tracking. That is, when going straight the rear wheel does not follow the track of the front wheel exactly. When cycling the symptom is usually not so much instability, but more a tendency of the bike to steer to one side. You might still ride hands-off, but have to nudge the bike by shifting your centre of mass to one side.
You may easily check gross tracking problems by pushing your bike through a muddy puddle. If the tracks are straight, parallel, but do not coincide you have a tracking problem. If they are not straight, or not parallel, you have to push more straight (not easy at all, bikes are not meant to go straight!).