I have treated three people very successfully for nail biting with hypnotherapy. You can check on the General Hypnotherapy Register website for a hypnotherapist near you.
I would be thinking that there is some deep psychological reason for you doing this for such a long time and not being able to stop yourself. Maybe try thinking, each time you go to do this what has become habitual to you, stop and think about your emotional state. Maybe try keeping a Journal and record every time you go to do this. It's a little like lighting up a cigarette, most people do this on automatic pilot, and your biting your nails is very much unconscious, so by bringing it into your awareness, it may help to shed some light on how your'e feeling at that particular time. If you have other nervours traits, you need to do the same with those, ie bring them into your conscious awareness. I hope this helps.