Why does this need fixing?
No one has tried to answer this, so I'll expand it a bit in case my point was missed.
The OP says he no longer wants to write. If I said "I used to enjoy chocolate, but now I just don't fancy it", no one would come along and suggest techniques to get my taste for it back; everyone would just say "Fair enough", or in some cases "Lucky you". Why is this different?
The assumption is that the OP, having written before, *should* still want to write. But unless he makes money at it, or stands a good chance at doing so, why should he? I think there's this tendency for writers to get invested in an identity as a writer. The idea of abandoning it causes an almost existential crisis. But it shouldn't.
When I did my MA, there was a fair bit in the first session about attaching to myself the identity of "writer", which is something I endeavoured to do. Much as I now love writing, I've come to wonder since if anything else since has done me so much psychological harm as that attachment to that supposed identity, because of the angst it caused me when I wasn't into it.
I think the OP, and anyone else in the same position, would be best off just letting go and waiting for the desire to come back by itself, which it almost certainly will.