And if you've got any advice, I'd like to hear it. I want to argue with him but I don't want to get cut out of his life.
You know where this comes from, and you saw it coming: it's the friend group and the porn. He's not connected to his body; I'm guessing the "friends" are online, and he's dissociating while masturbating with the porn, softening him up for "well maybe you are the girl."
@Procrastinhater has a point about the gym, except I bet the kid
hates that his body is big and designed to be a powerhouse, especially if he's carrying a history of being abused or intimidated by big people. Sometimes the "uwu smol" isn't just pornsickness, but a desire to be comforted and made to feel safe by a parent-figure. Tell this kid he could be a beast with some lifting, and he'll shudder.
All the untreated mental issues are going to stay untreated now, because the second he says "trans" any modern counselor is either going to jump on it earnestly, or be terrified that mentioning anything else will get them unpersoned for conversion therapy.
Still, he gets one body, and most of it just isn't changeable. Trans isn't a panacea for the life problems any 17-year-old, but it'll go worse for him. You said he has rage issues; with Discord egging him on (haw) he'll get less stable, because of course misgendering deserves a violent reaction, doesn't it?
You say he's stubborn and can't be convinced, so you're setting yourself up for more and more pain as you watch him decompensate. I don't think there's a magic argument; even finding testimonials of "detransitioners" who were in his same situation, teenagers who treated "trans" as the answer for depression and trauma, will get debunked by his enablers as crimethink.
This is going to hurt for you, no matter what. I think the most honest, cleanest thing to do is tell him what you see: he's looking for an "out" from being him, he's fallen in with people who think everyone is trans, he's self-deluding into thinking that the magic pill will make him not a giant man people are scared of, but you're worried he's going to be hurt worse as his fantasy self gets further and further from what people actually see. He needs to be thinking about adulthood and working, which is a scary transition, so the jobless troons online are even more inviting, with their dodges and ebegging and ways to sponge off their parents and be a "girl" not a woman.
So you could tell him that before he blocks you. Let him know you care for him and you will be here if he wants to talk, but you're not going to debate his Discord group vicariously; you just care about him.
Or I guess you could just send him gigahon memes.