There are a couple of reasons why it closed.
Primarily, the reason was market over-saturation. In the season of and the season just after Tuck, 25 new musicals opened on Broadway. This included both Tuck and Hamilton. In contrast, just 7 new musicals opened this season. The market over-saturation was already a problem, but it didn't help that Hamilton became a cultural phenomenon. With every show fighting for their own survival, against each other and against Hamilton, most of the shows couldn't turn a profit.
The other reason was that Tuck was seen as a children's show, because the main character is an 11 year old girl and the show is based on a children's book. Children's shows get a bad rap, and most people don't have vested interest in seeing them unless they're the parents of children.
Personally, I adore Tuck Everlasting. It's score is brilliant, and my third favorite of the season (after Hamilton and Waitress). I personally really wish it had been given a chance, because it is definitely not a children's show. It covers some really heavy themes, like death, mortality, and loss. I'd love to see another major production (maybe in the West End or a revival a few years down the line) that strips it down to a chamber piece. A high school near my hometown also just announced they'll be doing it, and I can't wait to see it in person!