Dictionaries such as Collins list melancholy as both a noun and an adjective. So we can analyze melancholy in your example as an adjective if we want to:
In his later years John was feeling melancholyadjective .
However, feel can also take a noun as a complement. Again I'll quote Collins, which gives the example "to feel anger", in which anger is clearly a noun. Since melancholy as a noun is typically uncountable, we can analyze melancholy in your example as a noun, as well:
In his later years John was feeling melancholynoun .
So which way should we analyze it? I don't think it makes a difference in terms of meaning, so I think the adjective-noun distinction collapses here. Although you can pick one category or the other, the distinction doesn't carry any meaning, so it doesn't matter.
Of course, we can come up with examples where the distinction does matter:
In his later years John felt a profound sadness.
In his later years John felt a profound melancholy.
Here we've countified the typically non-count noun melancholy. We can see that it functions like a noun, just as sadness does. And we can force it the other way, too (if you'll pardon the somewhat contrived example):
In his later years John felt profoundly sad.
In his later years John felt profoundly melancholy.
But in your example, it doesn't matter.
To answer your questions explicitly: all three of your sentences are fine, and feeling melancholic is considerably less common than feeling melancholy.