There is no question a well maintained wooden boat can last a long time, as can a well maintained fiberglass boat. The biggest point is that a poorly maintained fiberglass boat can also last a long time where a poorly maintained wooden boat won''t last very long at all.
If your looking at a boat look at more than the hull material, unless its a derlict wooden boat, the systems (sails and mast, engine, electronics, etc.) will cost a lot more to replace or upgrade. It is entirely possible to find a very inexpensive boat where upgrading and/or replacing the systems will cost a lot more that the worth of the boat if it was well found.
Unless you ave lots of money, or can do all of the work yourself, I''d stay away from wooden boats. This opinion is from someone who used to build and repair wooden boats and I have owned my own woodies. But as I get older I realize that I would prefer to sail not work on them and now have a fiberglass boat.