To get out of this situation while staying in the company you need a creative solution. This starts with understanding how you ended up in the predicament in the first place.
Why are you the only person who can do this work?
Its possible you ended up as the only person who knows how to do this because you managers didn't realize how important this area was. This can happen when one person is on a small system within a company. The system is critical to the operation of company but not core to what the company does. The company becomes dependent on the system without knowing it.
You can explain to management that they how have a classic "what do we do if I is hit by a bus?" Emphasize that you have not intention of leaving the company but they need to prepare for that possibility because unpredictable life events. They will probably realize this includes the possibility that you will leave for personal advancement. It’s a good thing that they know this so long as you are not using it to threaten them.
Then need someone else to know this stuff. For many kinds of work, training is a slow way to work. People take in little information when told things. People learn much faster by doing. So long as you are doing the work, even if someone is shadowing you it will talk a long time for them to get up to speed.
A better way is to have you stop working in this area without you leaving the company. If the managers replace you someone, then they will have to get up to speed fast. However, unlike if you were hit by the bus you are still around to answer questions. You should agree goals for how much of you time is spent answering questions. These goals should go down over time. If you are not meeting these goals, or you are cheating by working extra hours to help then this is not working and you need a different solution.
If could be that your immediate management recognizes that this is a problem but to keep within budget they have only allocated you to this area of work. In this case you need to talk to them about whether the benefit of this system to the company justifies having more than one person work on it. This additional expense may only exist long enough to train a second person. If the answer is yes then you can hire your replacement. If you do so you must have a training plan in place so that you can transfer ownership.
Complexity or Undesirable Work
I'm bundling the next two reasons together because their solutions are the same.
It is possible that your management team realize this is a problem and are willing to spend the money to have someone else learn this area but they struggle to find someone to work on it. This could be because the work is seen as undesirable by others, perhaps you use a technology which is considered outdated or perhaps the work is seen as frustrating and unsatisfying such as delinquent accounts receivable.
Another possibility is the system you work on is very complex and therefore it is very hard for others to get into the work. The complexity my be the nature of the work or it could be because the system which has been built over time have become complex.
The solution to these two problems is not to find someone to learn the system. The solution is to replace the system with something else. This presents a great opportunity for you to demonstrate your ability to solve a problem for the company using creative thinking, technical and even personal leadership. Think about alternatives you have? Can you break the system up or achieve the goals in a different way? Perhaps this involves deciding what the system must do and what you can stop doing because the cost isn’t justified. Is there technology or services you could use to replace you if you were willing to change how the company worked?
If you can present a plan to you managers to replace the work then they can decide how much you want to invest in solving this problem and how much you all benefit from the new system, including the benefit that they are not dependent on you.
While this may feel intractable at the moment, if you are you managers can take a step back from the day to day you may realize this is a great opportunity to work in a much better way for everyone, and get you out of a hole.