There are some important differences though.
Tyranids store the collected DNA 'data' in their Hivemind (or just the tendril...it starts to look like those are different entities). And start using that data to produce new kind of Tyranids if it's worthwhile.
Kroot need to consume a lot of DNA wit those specific traits over the course of generations to develope specific traits. They are usually organized in rather small tribes which are lead by a Shaper who directs his tribes evolution in a specific direction.
The difference is that while Kroot make use of DNA they consume, it's restricted to their tribe and way way slower and unreliable than what the Tyranids do. The Tyranids find some very tasty DNA data, consume it and suddenly you see a complete new kind of Tyranids a few days later across the whole fleet.
When it's about that part of their fluff then Tyranids are Kroot cranked up to 11 (while Tau are on a 3 or something lol).
That's also the reason why we are unlikely to see super powerful Kroot psycher even if they would theoretically have the potential. It's just very hard to follow a diet of powerful psychers over the course of several generations. They are quite rare and usually able to defend themselves well.