I think 40 is the perfect age to retrain! I changed career in my early 30s, through volunteering/work experience. I did Myers Briggs, thought about my strengths, made a shortlist, spoke to some people in the fields, got some experience in 2 fields, then made a decision. The decision process took about 6 months. I could have gone into more depth but I had already left my career so I needed an income eventually...
My advice, in no particular order;
-talk to people in the field (people who like the job)
-go with your greatest areas of strength
-look at what it involves on a day to day basis; do you LOVE it (I think you really have to, to stay sane...)
These above 2 are the most important imho.
-think about work/life balance/working style (what hours, geographical locations, team/lone working are you happy with), what does it offer in 5, 10 years time
-be prepared for it to take time to train, start earning at a decent level and become experienced and confident
-do not underestimate how tiring (and rewarding) learning and remembering new info is, do not underestimate the scale of the challenge full stop (for many years after I said I'd only change careers once, now I'd consider doing it again...), do not hold back from your passions, make it your decision, have an open mind about what it could be, it might even be a career you never considered!
-do consider income, how much do you need/want to earn, what level do you need to reach
-be really sure it is what you want to do
-have a look at Ikigai : )
Remember no job is ever 100% perfect, there are always tradeoffs.