going to pull in some other details from conversations today and try to give some consolidated advice
my understanding of your situation is that you've been there for 5 months, the past 3 of which you're on a project known to be "rough". you're not happy, which your manager is at least generally aware of, and you've missed an opportunity to work on a project that excited you because of delays in wrapping up your current project
5 months is not a long time. it's just enough to begin to understand the team and organization you're working with, and 3 months is very short — not approaching a "complete cycle" for most projects, let alone one that's struggling. from what you describe, it sounds like there's some real progress being made on improving the codebase, but it's going to continue to be a slow for a while longer. you haven't said much in the way of specifics, so i can't even begin to offer an estimate there
the way i see it, you have a couple of courses of action
- start searching for a new job, and quit
- formally request a transfer to a new team/project
- power through on this rough project
you've been very morose about your prospects if you quit, so it sounds like you don't want to explore that. if you request a transfer, it's very likely that you'll hear back "we can't right now, but maybe in a few months", which puts you in the same position as the third option. struggling projects can be a huge opportunity to make big wins for your career, but you have to charge at them — that means learning new things, building new muscles, and getting out of your comfort zone.
my advice to you is to evaluate those options. The Manager's Path is a quick read and cheap, for the relevant chapters. you absolutely can get most of the value out of it in about 4 hours of reading and $15 for an e-book. i think that book will help you chart a path for yourself, but it will require sustained hard work and an ability to motivate yourself. no one can do this for you