First of all, you have to understand that every organist is different and will have different set of skills and experience which will consequently make their learning process shorter or longer for each individual. However, there are certain variables that must be considered here which will help you understand the complete picture.
The first variable is the technical advancement of the organist. This means what kind of things he or she can play perfectly on the organ with the fingers, with the feet, and with the hands and feet combined.
Second, you have to also understand that the level of difficulty in every organ piece is not the same. There are easy pieces, difficult pieces, slow pieces and fast pieces so each individual will need different time in mastering different kind of composition.
However, you're reading this article not because you want to know what these variables are but in reality you probably want to know how long will it take for you to master any given piece that you choose.
In order to understand the answer, you can do the following thing. You can devise a plan with set of actions in mastering this piece with specific steps which would be needed in order for you to achieve the goal of perfecting this composition.
Let's say you want to master this piece in 30 days. Then you would need to look at the length of the piece. If the piece is 10 pages long and you have a due date after 30 days, this means that you have to master one page in three days.
It's a very simple mathematical calculation. Now as long as you can stay on track with this plan, practice every day, and master one page in three days, you will achieve this goal. However, you have to also understand that mastering each individual page is not enough for overall perfection of the piece.
You must have some additional time for combining these pages into larger units and that will take you more weeks. Of course all of this works only if you are still sticking to your plan, following through and learning one page in three days.
So in my example your piece of 10 pages long can probably be mastered in about 60 days, giving 30 days for mastering each individual page and another 30 days for mastering the piece in its entirety.
So consider these variables and the above example and you can determine exactly how long it will take for you to master any specific piece of organ music.