I can only speak to my own personal experience, but I was a voracious reader as a child and then sorta just... stopped. The longer life went on, the more I was instructed to ignore or hide my personal feelings and so I just didn't find the characters in the books for my age group, who were largely written by women, to be relatable. There was as large a stretch between the main characters' behavior and what I was taught to do as there was between the real world and Mount Doom. I devoured the entire non-fiction section at my library in the historical and scientific sections by the time I was 10, and then just stopped going because there wasn't a point. None of the books were for me.
I've made attempts to get back into reading from time to time, but I always go into the more rigorous non-fiction areas. I picked up a Brandon Sanderson book and wanted to throw the damned thing against a wall because of how juvenile the narration was. It felt like a very poor apeing of HHTG or Discworld narration without any of the wit.
Here are some authors to try out instead, biased towards Science Fiction -
Greg Bear - Amazing science fiction author who builds incredible far future worlds. He is asking questions like "what will humanity be like 10k years in the future".
Charles Stross - First off, wonderful characters. His Laundry Files series is like "what is a 1990s geek, complete with a Palm Pilot, worked for a secret government agency that handles occult issues" but over time it gets deeper and the characters get really fleshed out. It is also awesome because you get to see technology move with the time, since the books take place concurrent with our technological progress, so technology like PDAs make way for smart phones.
Elizabeth Bear - Just all around great characters.
Greg Egan - Science Fiction but deeply rooted in real science and math, his homepage https://www.gregegan.net often dives deeper into the math behind his books and includes citations for further reading! Many of his books lack the "science fiction gadgetry" feel (although some have it) if you are trying to avoid that.
Cory Doctorow - He used to be huge in the open source community (not sure, maybe he still is?) his books all explore interesting social issues through the lens of technology driven change.
FWIW many people do not like Brandon Sanderson and I avoid recommending his books.
IMHO all of the above authors have good characters, Doctorow tends to write younger characters (early to mid 20s), but the rest focus on mature characters. Some, such as Stross, let you watch a character start out young and mature throughout the books (I think his main character has gone from his 20s to his 40s, and it shows in how the character acts and approaches issues).
If you really like math, try Greg Egan. Quite a few of his books have the premise "what would be the impact if this odd bit of, real world, complete with citations, math was just a little bit different?" If that is your thing, then you'll be delighted at what he writes. :-D
e.g.
> In the universe containing Seth’s world, light cannot travel in all directions: there is a “dark cone” to the north and south. Seth can only face to the east (or the west, if he tips his head backwards). If he starts to turn to the north or south, his body stretches out across the landscape, and to rotate to face north-east is every bit as impossible as accelerating to the speed of light.
> I just didn't find the characters in the books for my age group, who were largely written by women, to be relatable
Were you reading contemporary books or older books? I found that there's lots of fiction for boys, written by men, from the 19th and 20th centuries. A lot of it is very good, many popular classics like Treasure Island. Edit: I see you mentioned that one.
A lot of the same for me, down to reading silly non-fiction books just to read something as a child. This has become nearly vestigial as I've gotten older.
Books like Huckleberry Finn, Tom Sawyer, Brave New World, 1984, Animal House, Treasure Island, The Lord of the Flies, The Old Man and the Sea, etc. made much more sense to me than any of the Judy Bloom style books that are so prevalent. The last of those books I enjoyed was "How to Eat Fried Worms," and then, that only resonated with me because we were forced to participate in a school book dressup day and I realized I could coat crunchy chinese noodles with chocolate and bring them to class.
I was a kid of the 80s and 90s. I grew up outside. I played rough and got hurt and then played rough again. I explored. My parents existed to feed me, clothe me, and yell at me for not achieving enough. Any book depicting a parent who sat their child down to give them sage advice about life was completely foreign to my experience.
I am not sure if you've already experienced-and-disliked his work, but may I recommend Neal Stephenson? I have always appreciated his style of prose, and the way he describes characters. He writes in a nerdy way that I can't quite explain, and I always trust that he will weave separate-seeming narratives together in a way that is satisfying (even if I am often dissatisfied at the _endings_ of his books).
Everyone points to Snow Crash (which I liked too), but recently I also really enjoyed REAMDE and the first half of Termination Shock (I haven't finished it yet). I love the way he describes things. I'd like to say that I could read + enjoy anything he writes on any subject, but for some reason I didn't like his Baroque Cycle books (but don't understand why not).
Also big recommendation for Terry Pratchett. The books all seem silly on the surface but usually have some incisive commentary on wider social issues, as well as being filled with references and humor, subtle and un-subtle. Bonus, they are also a lot shorter than Stephenson's. ;)
> I was a kid of the 80s and 90s. I grew up outside. I played rough and got hurt and then played rough again. I explored. My parents existed to feed me, clothe me, and yell at me for not achieving enough. Any book depicting a parent who sat their child down to give them sage advice about life was completely foreign to my experience.
You might like Cormac McCarthy's "All the Pretty Horses" [0]. The prose style is idiosyncratic, but also arguably his most accessible. It's about a 16 year old crossing over into Mexico and with little else but the clothes on his back and love for horses, but not "juvenile" --- if anything the author elevates the teen's stumbles into love, adventure, and heartbreak, into a grand vision of the American frontier.
Even Sanderson's "adult" fiction can read as incredibly immature at times. Every character seems to have a caricature of a mental illness. Every thought and feeling they experience seems to tie back to it, and it derails the story while taking away from the excellent world-building. I loved the Stormlight Archives to start with, but they became more and more "woke" (as much as I despise using that word) as time went on.
If you're interested in returning to fiction but through the lens of an adult - a little grittier - I'd recommend Joe Abercrombie, Pierce Brown, Dmitry Glukhovsky, Adrian Tchaikovsky, Dan Abnett, and Andrzej Sapkowski.
I've made attempts to get back into reading from time to time, but I always go into the more rigorous non-fiction areas. I picked up a Brandon Sanderson book and wanted to throw the damned thing against a wall because of how juvenile the narration was. It felt like a very poor apeing of HHTG or Discworld narration without any of the wit.