The problem is distinguishing between a real loss of interest and a temporary loss of confidence and motivation.
A real loss of interest is no big deal, as long as you replace it with interest in other things. Nobody has to be a writer, except a writer.
Signs you're suffering from the second syndrome:
-- You can't think of anything you'd rather do than write.
-- Your interest in writing is YOUR interest in writing, not an interest someone else is imposing on you.
-- Your motives to write include the joy of the process and satisfaction in the product, not just publication/fame/money.
-- A quiet inner voice tells you you'll regret giving up writing a year, ten years, forty years down the line.
Temporary loss of interest (motivation, confidence) is endemic to writers. It can last for a hour, a day, a week, a month. In hard cases, it can last for years. The ultimate cure is discipline, which hardcore writers must develop. Excited or blah, they learn to sit down and turn out copy.
If you decide you really want to write and you're going through a slump, or even if you're not sure whether this is a slump or a permanent goodbye, try the first step toward discipline, which is writing everyday.
Pick a very modest daily goal. Could be a half hour or could be 250 words. I'd recommend a word count goal. Then either work on a project or simply free-write. But write, meet your very modest goal, and then get the hell out and live.