I just got my trek marlin 7 bike and was wondering if I can convert it to TA( through axle).
TLDR: rear, no, front, maybe. But the gain would be marginal, and is not worth the complication.
For the rear wheel, no, as the attachment system is part of the frame. But even if you could change it, the spacing for the wheel would still be 135mm (or 142mm TA axle length), while TA MTBs are using the Boost standard and have a 141mm spacing (so a 148mm axle length). To my knowledge, the offer in off-road wheels with 142mm axles are mostly gravel bike wheels. 142mm MTB seems to be a niche compared to 148mm or gravel.
For the front wheel, it's a bit different. You could technically change the fork and choose a fork with a through axle ...but: you need to check what kind of head tube the bike has: 1"1/8 (found on entry-level MTBs) or conical. I haven't seen forks with 1"1/8 head tubes and TA. Trek doesn't say which standard is used on the Marlin (which usually implies it's the one considered the "lowest"), so the answer is "probably not".