Deciding how a lich is created is the DM's job, as the game does not provide the answer (and arguably it should depend on the setting anyway). Your DM sounds cooperative, so I'm sure you can come up with something creative and awesome together.
Outside materials for particular campaigns, there is only one official way for a PC to become a lich. The Book of Vile Darkness is detailed in the 5th edition Dungeon Master's Guide (p222). It doesn't describe the ritual to any great extent, leaving it largely in the GM's domain to determine what steps a character aspiring for lichhood ought to take. Some guidance can be garnered from the Monster Manual, though, on creating plotlines for your characters to become liches without the book.
Under the normal monster lore, a wizard can become a lich only through a pact with various evil planar entities, as described in the 5th edition Monster Manual:
Wizards that seek lichdom must make bargains with fiends, evil gods or other foul entities. Many turn to Orcus, Demon Prince of Undeath, whose power has created countless liches. However, those that control the power of lichdom always demand fealty and service for their knowledge.
(Monster Manual p203, under Lich)
The process to become a lich involves the sacrifice of the soul of a sentient creature:
...the future lich drinks a potion of transformation - a vile concotion of poison mixed with the blood of a sentient creature whose soul is sacrificed to the phylactery. (Monster Manual p203, under Lich)
The phylactery requires regular soul sacrifices to prevent the lich from devolving into a demilich. The heavy measures needed to sustain lichhood are so extreme and repulsive that it takes a truly evil character to embark upon this road...
...unless...
Blast from the past: Archliches
Assuming you're ok with adapting material for earlier editions, at least in the third and fourth editions there is a good-aligned variant of the lich: the Archlich. No official 5th edition material exists for Archliches as far as I know. The 4th edition source materials for Archliches describe them as choosing lichhood as a means to a noble end, not as an end in itself, and diligently learning the rituals involved as opposed to taking the easy path of acquiring the secrets of lichhood from Orcus or other fiendly creatures. Archliches retain their personalities and memories, and are not mentioned to need soul sacrifices to avoid becoming demiliches.
While Archliches offer a way for non-villainous characters to reach lichhood, lore-wise the ritual to reach this state has to be hard enough to discourage even most talented spellcasters from choosing this route instead of Orcus's support.
Campaign-specific methods
According to the user blade, a method for becoming a lich is detailed in the Curse of Strahd campaign materials. I do not know this method personally, because I am going to participate in a CoS campaign myself and don't want to spoil anything about the module to myself. If you have a copy of the CoS materials, you can look it up yourself.
Best Answer
A warlock following a patron of The Undying
In the new Sword Coast Adventurers Guide (page 139), The Undying patron is detailed. This seems to suit your needs exactly, although you might not be able to change from one class to another without your DM's permission.
Listed as example Undying are actual liches like the lich-queen Vol, Vlaakith the lich-queen of the githyanki, and "sentient wizard zombie" the deathless wizard Fistandantalus, among others.
Your alignment is not tied to your patron, and you can read about that here.
The Undying expanded spell list includes spells like contagion, death ward, false life, ray of sickness, speak with dead, and other lichy type things. The following features are paraphrased, so you'll need to grab a Sword Coast Adventurers guide to get specifics.
Among the Dead
At 1st level, you learn spare the dying and have advantage on saving throws against disease. Also, when an undead creature targets you, they make a Wisdom throw against your spell DC and can't target you on a failed save. They are immune to this for 24 hours if they succeed or if you target it with an attack or spell.
Defy Death
At 6th level, you gain 1d8 + Con hit points when you succeed on a death saving throw or use spare the dying once per long rest.
Undying Nature
At 10th level, you can hold your breath forever and don't need food, water, or sleep. You also age 10 times slower and can't be magically aged.
Indestructible Life
At 14th level, you can use a bonus action to regain 1d8 + warlock level hit points. You can also reattach severed body parts when you use this feature. can use once per short or long rest.
So, while not technically immortal, this is pretty close for RAW and requires no homebrew unless you change from your current class to a new one. An elf Undying Warlock can live to be about 7000 years old, which is really enough time for you to roleplay until you actually die of old age in real life.