Another answer began with ...
Unless one only has a couple of years to live due to a terminal disease, one is never too old.
... but I'd like to correct that i.e. to say that one might learn in less than a year.
I'm in my late 50s and I started to learn guitar less than a year ago -- folk-style guitar, e.g. strumming the "open" chords and singing.
My guitar skills are now that I can play a song like (most recently) Mad World almost instantly, i.e. assuming that ...
- I know the song (i.e. I've heard it previously and like it)
- The chords are easy (e.g. no barre chords) and my fingers know that chord already
- The rhythm or strumming pattern is easy (I might play but find it difficult to sing on top of playing, when the rhythm of the melody I'm meant to sing is unlike the rhythm of the guitar -- perhaps what's called "syncopation")
... I already know the chords for that song (i.e. Em, G, D, and A) well, and so I can just play them. I can learn to fit the chords to the song after only several minutes of practice.
There are a lot of songs like this -- easy three- or four- or five-chord songs -- see e.g. PartyMarty EasyGuitarTunes (though, when I want to see how to play a song, I've found/used many other sources too).
So, "mission accomplished" to some extent. I can sing and play well enough to accompany my own singing at amateur folk club evening (previously I could only sing, unfortunate since the commercial music I have liked e.g. starting with The Beatles tends to be accompanied).
I've still a way to go, of course ...
- Learning to play barre chords -- I can play some now but the trick is to play them fast enough for them to be usable in a song -- e.g. a chord like Bm or F, which are needed for some songs (I can now nearly play Tomorrow Wendy well enough to perform it -- it has a Bm in it, i.e. the chord progression is D, A, Bm, G).
- Learning to play finger-style -- e.g. I nearly know how to play Dust In the Wind now, i.e. I can actually play it but not yet perfectly -- apparently that song was written as a finger-style exercise.
- Picking -- I'm strumming with my fingers. I can strum various patterns, strum fairly rhythmically, but I'm not good at using a pick and can't very accurately hit specific strings when strumming.
- Playing by moving up and down the neck (I'm not sure what that's called, but I mean not using open chords at all).
- Playing with other people (playing solo is easier, or with a teacher who will keep pace with you rather than your keeping pace with them).
... an infinitely long way, especially compared to any professional, but "mission accomplished" too.
I had a guitar teacher for several months -- not a professional teacher, a kind neighbour who has played an an amateur since he was young -- with once-a-week lessons.
He told me to practice every day, even if only for 5 minutes (also I have a steel string acoustic, which hurt my fingers until they acclimatised to it) -- that 5 minutes of practice every day is much better than half an hour once a week. The key is to develop the new habit, of practice, of playing.
- You can learn quickly (e.g. the difference between knowing how to play a chord and not knowing, or knowing what chords to fit a song and not knowing).
- Then improvement might come slowly, because to play (e.g. to make chord shapes with your left hand) fast enough, it's not sufficient for the brain to know how, the fingers themselves need to be able to do it.
At that stage, I found I didn't seem improvement in my playing from one day to the next (i.e. I was often no better than the day before), but (with daily practice) I did see progress from week to week -- so don't get discouraged, it's quite an interesting learning practice.
Sometimes I practice longer than 5 minutes, but I think it's the daily habit that will make progress inevitable.
I'm not actually taking lessons any more, perhaps I've learned enough that I can learn more (e.g. from YouTube), and practice more, unaided.
He also told me to practice songs I like -- i.e. songs that I'd want to learn, to practice -- to find songs I like that I can practice. I think the first one he gave me was Hide Your Love Away (playing the C chord instead of F) -- but, yeah, what you like.
Anyway, it's not too late. Being intellectual and all too (i.e. some kind of technician, which I define as "someone who reads the manual") I've learned a bit of music theory (e.g. why the various chords are named as they are -- "major", "minor", "sus4", "add9", "C/E") but I think that's optional, there are people who just play by ear instead (and you can learn chords and finger-picking using tabs or charts and from watching other people play and explain). I think I read (I don't know if it's true) that The Beatles were unable to write music, so the songs they were able to practice were only whatever songs they were able to remember from one day to the next (maybe part of the reason why their songs were memorable and initially not too complicated)!
It takes me a very long time to derive melodies as a result, and I am hoping that learning a string instrument would help me develop the skills to be a better composer.
I'm no musician but, though I like to play and practice, I'm not sure that learning guitar is the most efficient (i.e. the least time+effort) way to learn theory and to compose a melody -- e.g. because a lot of the practice is physical -- habitual finger/chord shapes, fine-motor and gross-motor skills.
If your primary interest is composing melodies (N.B. that I don't know) you might be better with videos about theory (I like the 12tone videos), with something like a keyboard, and/or perhaps software such as MuseScore or similar.