I'm 37 and just started a couple years ago. As a lifelong piano player I kept putting off learning the guitar because I'd get frustrated and just switch over to piano.
The thing that helped me the most was finding a good guitar teacher and taking lessons. Knowing that someone was going to be listening to my progress every couple weeks (and knowing that I was paying him) gave me a lot of motivation to practice.
Another thing that helped me is buying my first guitar. I hesitate to mention this because I see a lot of guys with really nice guitars who have clearly never put the work in. I started learning on my wife's Fender Squier. It's a nice guitar, but once I bought my LP studio it inspired me to practice for two reasons: 1. I liked playing it! and 2. I felt like I needed to do it justice. That feeling of having to justify owning such a beautiful instrument by playing it well was quite motivating to me. I'm currently GASsing for my second guitar and I'm channeling that energy into practicing more.
I feel like now, at two years playing, I have got past the early hump, so I agree with the "first couple years are hard" comments above. I can now sit down with a song and learn it - at least the rhythm parts - in a couple days. A year ago it would have taken AGES. I still have to watch my right hand a lot because I hit the wrong strings (especially when string skipping), I still struggle to learn solos that use the lower frets because I have small hands, and so on. But I feel like a guitarist finally. Good luck and I hope you get there too.