My character was unaware of a group of bandits, but my character cannot be surprised (I have a Weapon of warning) but the rest of my group is out of the range of my weapon of warning, do I get to take my turn even when the rest of my party was surprised? Do I take my turn before the attack of the enemy if my initiative is high enough? Please help.
You take your turn and can act as normal
The Weapon of Warning (DMG, p. 213) states:
[...] you and any of your companions within 30 feet of you can't be surprised, except when incapacitated by something other than nonmagical sleep. [...]
You have stated that your companions were all outside of the range for this effect, however that does not prevent it from working on you. From the rules for Surprise we have:
If you're surprised, you can't move or take an action on your first turn of the combat, and you can't take reaction until that turn ends. A member of the group can be surprised even if the other members aren't.
It is important to note that surprised creatures still roll initiative and have turns in the initiative order, they simply cannot act on their first turn. Since you can't be surprised you are free to act as normal on your first turn. If you manage to roll higher initiative than your enemy you can indeed attack before them, this is exactly what this item was designed to do.
Your group is surprised, you aren't
Combat works like this:
Determine surprise. The DM determines whether anyone involved in the combat encounter is surprised.
Establish positions. The DM decides where all the characters and monsters are located. Given the adventurers' marching order or their stated positions in the room or other location, the DM figures out where the adversaries are--how far away and in what direction.
Roll initiative. Everyone involved in the combat encounter rolls initiative, determining the order of combatants' turns.
Take turns. Each participant in the battle takes a turn in initiative order.
Begin the next round. When everyone involved in the combat has had a turn, the round ends. Repeat step 4 until the fighting stops.
For your situation:
The bandits are not surprised, you are not surprised, your party members are surprised.
We'll take this as read.
Everyone (surprised or not) rolls initiative in the normal way. This will set up the turn order, some surprised people may roll higher than non-surprised people - this is fine.
Take turns. Starting at the top of the initiative, each character takes their turn. "If you're surprised, you can't move or take an action on your first turn of the combat, and you can't take a reaction until that turn ends." In effect, a surprised person "loses" a turn.
Begin the next round - surprise is no longer relevant.
The way that surprise works in D&D 5e is that if you are surprised, you take no action (or movement, bonus action, etc.) on your first turn in combat. You also cannot take any reactions before your first turn ends. You still roll initiative at the start of combat, before any actions have been taken, as normal.
So in short, yes, you take your turn before the enemies do if your initiative is high enough. Also yes, this can create some narrative incongruities if you think about it in the most naïve way. If you want to justify this, there are a few ways you can try to go about it. One simple way would be to say that the character spots/notices the attackers the instance they launch their surprise attack, and is able to react quickly enough to get into action before they are able to do anything effective.
The other answers are correct, but there is more to add. If you're coming from other systems, including earlier editions of D&D, you (or your DM) might be used to the "surprise round." 5e doesn't have this concept. Instead, "surprised" is effectively a condition, somewhat like being stunned, that prevents affected creatures from moving or taking actions. If something prevents you from being surprised, you will never suffer this condition and can act normally.
On a related note, a surprised creature unlocks its reaction when its turn in the initiative happens, meaning it can still sometimes do something during the first round.