i hit the tag limit trying to say this earlier so i'm sorry about this wall of text. but yeah i said some of this on chii's response to this question but this is a different approach that really hits the root of both characters' baggage behind being compared to john and the general nuance of their reactions to john's abuse but it's also important to note that simply‚ when just looking at the contexts of the conversations‚ dean only ever pulls out this comparison (re: both 1.22 and 4.19) as an argumentative technique because he's privy to sam's response to john's abuse and he's trying to gain a leg up within his reasoning.
in 1.22 he's trying to get sam to understand his perspective (it could be argued that he himself is emulating john when he places himself in the role as the protector "i'm the one who's going to have to bury you." especially when he doesn't have to within the context of their current conversation*‚ which then develops into the 'protect the innocent' behaviours we see him use with adam) re: taking the colt despite the fact that *sam's actual reasoning has nothing to do with that of john's behaviour that dean is comparing sam to. sam literally also does something similar in this conversation by feigning loyalty for john's wishes (within a season that he's gradually non-pathologising john's abuse largely because of dean's own excusing of john's behaviour) as an argumentative technique‚ hoping to appeal to dean's own idea of john.
dean's behaviour has devolved into abuse by season four (before then, really, but their codependent dynamic is amplified by their relationship conflict) and his comparison of sam to john succeeds this whole conversation in which he claims that 'it's too late for [them]' while actively packing sam's own endeavour wrt leaving The Life for college with negative connotation while claiming that it's what adam deserves (positive connotation).
ardent's point about the perspectives that they're both arguing from on adam's behalf circles back around to dean's idea of what their relationship dynamic should be, and my perspective of the seasons's conflict about how sam is both unable to and refuses to fold into that box; sam is simply sticking to his own beliefs as a person who grew up in the liminal space of not being granted information when he was definitely entitled to it while also being denied the opportunity to exist outside of The Life by granting adam the privilege (what it shouldn't be when adam actively wants to be part of it) of information rather than resorting to compromise with dean's beliefs (ardent's 'protecting the innocent'; people often frame dean's reasoning here as righteous on adam's behalf but the proof that it's not is right there a second before he says it. it's hypocritical—it's an attempt at 1) wringing their hands of adam in a desperate attempt of control of the situation in which he's just found out he has a long-lost brother and 2) an argumentative technique). by doing so, they're emulating their childhood dynamic (as shown in 3.08) wherein dean is quite literally behaving on john's behalf (also explicitly said in dialogue: "he didn't want adam to have our lives, okay? and we are gonna respect his wishes.") which is in stark contrast to what he's saying—he claims sam is being very john-like when the literal opposite is apparent. it becomes projection. by the end of 4.19, when dean's sam-as-john claim is made, their argument is over, and he's simply trying to hurt sam because sam had been being defiant against him, rejecting the terms of their codependency again, and sam perpetuates his defiance in response by countering the hurt that dean wants sam to feel with exactly the same kind of appeal to dean's own worship (that dean has previously expressed despite his resentment for john) of john that sam did in 1.22—"dean, you know how pissed dad would be if we used all the bullets? dean, he wouldn’t want us to bring the gun." -> "i'll take that as a compliment." ("you take it any way you want.")
azazel also uses this sam-as-john claim as a persuasive appeal to the grooming, by john, he was hoping sam was enough of a victim of in order to follow through in killing his own father for the sake of the hunt but sam immediately disproves said claim. dean—also as a character that garners more narrative sympathy by season four—and azazel as patriachs guarantee that their language has more power/weight as a storytelling technique both when it comes to the audience and sam's own internalising of responses to his actions by either immediately disproving it (his response to azazel) or leaning into it (his deflection in his response to dean). sam compares dean to john when dean is Literally and Actively sitting in an explicit household patriach role and when dean is, in actuality, at the beginning of his worst in emulating john yet this is very rarely brought up in conversation about sam's emulation of john because 'sam is a john clone' is an entirely shallow understanding of john, dean and sam's dynamic. the role dean plays re: emulating john with jack isn't something that exists out of the blue either and dean has been officially sitting within john's role in the cycle of abuse for some time—"you're the one who said don't come back dad, you closed that door not me. you were just pissed off that you couldn't control me anymore!" / "you walk out that door, don't you ever come back." (before then of course, but how much more blatant can you get with this dialogue?)
anyway‚ like ardent says, sam is like john but the thing is: it's morally neutral. he's just as much like john as he is like mary, and just as much as he's like dean, and just as much as dean is like mary, and just as much dean is like john, and just as much as dean is like sam. both sam and dean emulate john is different ways of course: sam's idea of revenge as agency comes from what he's seen john do for his entire life (so does the way he hunts because it's all he's ever known) and dean's abusive, on-screen behaviours match john's to a T (emotion projected outwards onto people whose responsibility it shouldn't be, because it's exactly that happened to him).