This answer will have a lot of spoilers for the One Piece series. They are years old spoilers, but be warned. I will not be hiding the spoilers in Spoiler Tags.
Like with all things in writing, there is no one-size-fits-all answer. What I am using in my answer has helped me in my writing, but this answer (as well as all of the others) is not definitive. The important thing to remember is that every writer faces this issue at some point. It's better to realize this is an issue for you now as opposed to later on when your writing style has been the same for dozens of years like some professional authors. What matters is how you choose to grow from this experience, so take heart and don't be discouraged. (Can I Downvote myself for using "take heart" unironically?)
First, I know you don't like that you keep going back to a similar character type, but the best writers write about the things they know. It's far easier to write a good character who has struggles that you relate to as opposed to fabricating wholly new experiences for them. Sure, writing about supernatural battles isn't something you know from experience, but knowing how you would respond to the pressure and tension likely is (especially if the battle is a metaphor for something deeper that you have experienced).
Changing the character template you write is NOT necessary. I get it. It feels like you write the exact same character every single time. The people that you write in your stories don't feel as though they are unique because they all have the same design in that they have these issues. But this isn't necessarily a bad thing. Let me give an example...
Bob is a teenager who sets sail on the seven seas with a dream. We see him take on powerful enemies and strive to overcome his problems and weaknesses until, suddenly, we learn that he has a really dark past. We see that he's had a tragic history, but is still fighting towards a brighter tomorrow.
Bob is literally every single Strawhat Pirate in Oda Eiichiro's work One Piece. Despite this, Oda uses a very simple technique to differentiate each Strawhat despite using the same template for all of them: Finding motivation.
Luffy wants to be King of the Pirates because 1) it seems cool, 2) Shanks was a pirate and risked his life to save Luffy, and 3) Luffy made a promise.
Usopp wants to be a brave warrior of the sea because 1) he's a weakling and a coward, 2) he's lied about his exploits to the woman he loves and wants to tell her a true story, and 3) his father became a brave pirate so he wants to be just as great by following in his footsteps.
These are the two most similar Strawhat Pirates in that they are both goofball characters who rarely act seriously and their constant acts of stupidity create annoyances for their crewmates, but at the same time know when something is serious enough to be responsible. Despite being highly similar in personality in many respects, they are actually entirely different because they both have different motivations... but there's another aspect to motivation people forget exists: Sins and Virtues. (The previous motivations can be referred to as "Background".)
I am a HUGE proponent that when writing a character you should be able to answer two questions about them. "What sin do they struggle with?" and "What virtue do they extol?" All people have some sin and some virtue, even if you ignore the religious aspects of both. Even if you are working off of a character who has total amnesia, he will still have a tendency to act in certain ways despite their lack of background. Just a refresher on your Sins and Virtues for you...
The Seven Deadly Sins - Pride, Wrath, Envy, Greed, Lust, Sloth, Gluttony
The Seven Heavenly Virtues - Humility, Patience, Kindness, Charity, Chastity, Dilligence, Temperance
If we compare Usopp and Luffy, we can see where they differ in this respect. They may both be goofballs, but Luffy suffers from a Lust for adventure and strong opponents to fight with, alongside having great friends. (It's worth noting Lust is just a desire for pleasure/luxuries. What is a pleasure or luxury to one is not necessarily the same for another. In Luffy's case, he ironically lacks a lust for sexual pleasure, but has a strong desire for friends and adventure to the point he gets angry at Usopp for asking Silvers Raleigh where the One Piece actually is at.) Luffy is also one of the most Charitable characters in the entire world. Sure, he won't go out of his way to share his food or gold with somebody, but when he saw Nami crying after she was betrayed by Arlong, Luffy told her he'd take care of it. When Luffy saw how the fishmen were being treated by the World Government, he was made angry at their treatment and started working towards helping the fishmen. Whenever Luffy sees another pirate or a Marine mistreating their crewmates, Luffy gets angry over how that person could treat their friends like that and fights all out. Additionally, in this world where it is "kill or be killed", Luffy makes it a point to try to avoid killing people even when they have nearly killed him. Obviously, he doesn't avoid killing everybody who gets in his way, but he doesn't normally try to kill people either.
Usopp on the other hand suffers from Envy. He wants so badly to be like the great people around him. He wants to be like his father, like the giants, and most importantly like his crewmates. When he was fighting against one of Arlong's lackeys, we even see him trying to come up with a great story for how he fought his fight... all while he had played dead, waited for his opponent to walk away, he gets up, and starts rubbing ketchup on himself to look bloody and dirt to make it look like he got into a really rough scrape. One could say he's slothful, and I agree that's a second major motivation for him, especially with how much he lies, but I say he's more Envious because his desire to be like these great people he looks up to is far more powerful a factor for him than his desire not to do things, especially when we see he takes great pride in actively taking care of the Going Merry (their ship) and creating new tools to help him with fighting or even entertaining the others (Nami's Clima-Tact and Perfect Clima-Tact are great examples of this). As for Usopp's Virtue? Usopp is a man of Diligence. While you can argue that Luffy is too, there's a core difference in that Luffy is a person who can make things up as he goes along. Usopp takes a look at what he sees his strengths and weaknesses are and develops equipment to amplify his strengths and to lessen his weaknesses. He takes proactive steps towards those ends constantly while he's making new equipment for himself and the steps he takes in fixing the crew's ship shows just how diligent he is, especially considering how great a job he does cobbling together repairs despite not being a shipwright.
It's because of these major, but simple, differences in motivation that Usopp and Luffy are so different despite being the same on paper. Then don't get me started on the REST of the crew (potential new additions to the crew that have yet to be confirmed included).
So how can you make use of this? Quite simply, follow this guideline:
- Create your character template. (mentally ill, angry, sad, low on self-esteem, and possessing a distorted self-image)
- Decide what you want their background to be. (What major events have happened in their life?)
- Decide what their motivation is. (What sin motivates them, but virtue do they also embody despite that?)
- Write with the perspective of them always working within that framework.
If you want some extra room to work with and have gotten used to fleshing out characters with this layout, add an extra layer to their motivation. Right now, with their motivation being one of 7 sins and one of 7 virtues, this gives you up to 49 different characters to write, even if all other details about their lives are exactly the same. How a person who is greedy and patient acts will vary quite drastically from how someone who is slothful and patient OR from someone who is greedy but humble. You can even play around with contradictory motivations like a person who is proud yet humble (Lord Escanor from the manga/anime Seven Deadly Sins) or a person who is greedy yet charitable... but LAYERING your motivations will make it so you have more realistic characters with a wider range of reactions.
You may think their "Motivation: Sin" should be Wrath simply because "My character is the sad and angry type," but not everybody who is perpetually angry has to be a wrathful person. Wrath is violent and wishing to cause harm. While anger can be like that, there can also be righteous anger that wishes to tear down an injustice or sullen anger that is directed at someone, but doesn't go to the point of wishing harm.
No matter what, when you're writing characters, you'll find you gravitate towards one response or another when you can't have them act according to their motivation. Oftentimes this emotion they will emit is anger, but it doesn't have to be. This is a more complex level of writing and should generally only be done for LONGER works (like a serialized publication spanning volumes upon volumes), but it has a merit if you have the length available to make full use of it.
For a simpler version of this: When you are selecting a sin and/or virtue, select one or two of the other 6 motivations of that category and categorize the motivations in order of prominence. I'm going to assume I am writing a Greedy character.
Name: Greedy Boii
Primary Sin: Greed
Secondary Sin: Lust
Tertiary Sin: Pride
Virtue: Diligence
What this list says is as follows: Greedy Boii is a person who will act in accordance with his desire to accumulate possessions or wealth. If for some reason he is unable to get something he wants or if in the moment there isn't anything physical he wants or needs to be actively involved with to acquire, he will strive to get pleasure from the experiences around him instead. If there is nothing he has to do to get the things or enjoyment he wants OR if he is prevented from getting those things or feelings, he will strive for attention at any cost. When it comes to getting the things he wants, he'd be very diligent at working towards his desires until he succeeds, whatever his goals and desires may be.
This sounds pretty archetypal of the greedy character, right? But imagine if I changed his secondary sin to Sloth instead:
Greedy Boii is a person who will act in accordance with his desire to accumulate possessions or wealth. If for some reason he is unable to get something he wants or if in the moment there isn't anything physical he wants or needs to be actively involved with to acquire, he will strive to rest and relax instead. If for some reason he is unable to rest or if he is actively being prevented from getting the rest he craves, he will strive for attention at any cost. When it comes to getting the things he wants, he'd be very diligent at working towards his desires until he succeeds, whatever his goals and desires may be, but if there is ever an opportunity to rest, he will take that chance sometimes resulting in his plans being at risk of being compromised.
While they are still similar characters on the surface, they're only similar in that they both want physical possesions. GB1 wants wealth, women, and fame whereas GB2 is more like the kind of person who wants to live an opulent life of luxury, rest, and attention. It's the difference between a stereotypical rockstar and a stereotypical politician. Everything changes once you dig a little deeper into who they are/what they want. Additionally, whereas before you only had 49 character types, now you have 1470 character types. If you were in a position where you could expand this further, it would give you up to 25,401,600 different character possibilities. Combine these possibilities with their different backgrounds and now you have a near infinite number of possibilities even if they are all cut from a cookie-cutter history. Just take your time to think how the motivations would influence their lives and you should be fine.
Ultimately, all characters will feel similar to some degree. Unless you go out of your way to try creating as opposite of characters as possible, it's pretty much an inevitability. After creating a couple characters, though, that will stop being possible. It's better to think of how you can diversify your existing cast as opposed to try to make drastic differences. You write about what you do for a reason, so take your characters and make sure they follow their motivations. If you see them making a choice that goes against their motivations, such as if either of my Greedy Boiis were to start offering charity for the sake of charity, you know that you're not writing with them in mind and you can just rewrite that scene. If you ever want to make sure you are writing within motivation, organize the Sin(s) and Virtue(s) by order of prominence in the character and go from there. Even using GB1, a person who is more diligent than he is lustful would take an enjoyment from the experience has he waits for his plans to come to fruition. In GB2's case, a person who is more diligent than he is slothful would wait to rest only until after he has completed his goals, at which point he may be out for days or weeks until he has a new desire.
If it helps, create a flowchart to guide yourself. What are his motivations? Okay, because of it, "What will he spend his time doing?" "While he waits what will he do?" "If he can't succeed, how will he respond?" Keep the flowchart with answers linking from one outcome to the next nearby while you write, and you'll see you can keep your characters acting quite differently, just as how Nami from One Piece wants money and treasure, while Luffy wants fun and adventure. They're both after the One Piece, but for completely different reasons and motivations/feelings to satisfy.
I hope this helps!