Yes. Many beginners training for a marathon will take 4-6 months to train safely for their first race. Athletes who have (essentially) never run before, will be closer to 6 months, where those with some 5k experience might be able to shorten it to 4.
A combination of running, walking and cross training allow for someone who has little to no experience train effectively in that time period.
Naturally, nothing worth doing is easy, so don't confuse possible and simple with easy - as training for any marathon will have it's physical challenges.
Training will take a toll, so it's important for any beginner to learn to properly rest, recover, stretch, hydrate and fuel their body throughout training.
So, if you really are starting from the couch, you might still be asking...
The first step is acclimating your body to training. If you're not accustom to physical activity, going from 0->15 miles a week will be a daunting task.
But there are 3 key ways to make it easier:
Consider an average of an hour a day, or 6-8 hours a week a good target for beginners training for a marathon.
Some weeks will be less, and some peak weeks with your longest runs will be slightly more. Generally though, it breaks down to 1 hour per day across 4 sessions during the week, and 1 long run during the weekend, which could stretch from 1->3 hours over the course of training.
The key to marathon training, especially for first timers, is consistency of moving (almost) every day. Not so much a few days of really high mileage.
Slowly. Too many articles suggest beginners need to run 35-40 miles a week before jumping into training. In reality beginners need to simply commit to being able to move for 1 hour a day, even starting with walk/run combos.
Commitment and consistency are more important than previous experience here, and with a 6 month time frame, anyone can tackle a well designed beginner marathon training plan.