I've never had a bird be finished laying at 2 years.
Now, they do slow down. they molt, and take the winter off unless you supplement lighting for them. Then they resume in the spring, laying slightly fewer eggs each cycle. My birds have repeated this cycle until about 7 years old, when I've kept them that long.
It's up to each of us to decide if we want to keep birds past that mark, feeding them over the winter while they don't lay. You need to balance that cost and effort against brooding new chicks each spring. It's an individual thing for each to decide.
I've found I'm selling most of my birds off around the 2 year mark, but it's more because I find a new project that catches my eye, and I need the space. My birds aren't lifelong pets, so off they go to a new home and a new fancy takes their place.
You can absolutely butcher a 2 year old hen. Will she taste like a grocery store bird? Nope, not at all. Texture will be different. She's not a 8 week old baby who has never been allowed to move around, she's a mature animal with actual used muscle tissue. You'll need to tenderize that tissue by cooking low and slow, or in a pressure cooker. Do that and you'll likely be surprised at the depth of flavor chicken can have. Folks joke that everything "tastes like chicken", meaning chicken doesn't really have much flavor itself. Well, that's true of the grocery store chickens. Mature birds, hens or roosters, have a rich full flavor.
Look around on the meat bird section and the recipes section, there are recipes there about cooking older birds.