Check that the threads aren't damaged on either the steer tube or the threaded cup and locknut. If the headset threaded parts are damaged, it's easy to replace the headset. If the steer tube threads are damaged, that's more of a problem. Several wraps of plumber's tape might help if the damage is slight, otherwise you're looking at filling the damaged threads with brass and cutting new threads into the brass, or replacing the fork.