Thanks for contacting FixYa with your inquiry.
Check externally for the obvious things first like a bent shift lever or lever re-installed in a position interfering with frame or something preventing engagement into 1st gear. I'm never that lucky.
More than likely you have either bent a shifting fork or lost a tooth on a gear or something on the shift mechanism internally is bent, broken, or has lost a clip. Drain your oil and check the plug magnet to see if any metal shavings, fragments, or parts appear.
You will most likely have to pull the engine and split the case and replace parts. You can take it to a shop or if your handy do it your self. Take a look at the link to the parts fiche and determine your preference.
http://cyclehuttktm.com/FicheFinderNew/FicheFinder.aspx
2001/400/Engine/Transmission II (Don't know if your bike is a SX or EXC Racing)
2001 > 400 SX RACING > ENGINE > SHIFTING MECHANISM
You can also order a repair manual from this site or ask your dealer
http://www.repairmanual.com/KTM.html
If we can provide other information or service please advise.
Kind regards,
TF