If a domain ranks first on Google for a keyword and then you 301 redirect it to another domain, the ranking is transferred to the new domain, whether or not it's relevant.
I do not quite understand your question exactly. Here is my assumption based on your post. 1. If you meant 301 redirect can help transfer ranking from an old site to a new one. Yes it can but not in a short time period you may ever expected. Google has to aware of any redirect activity and they will not give any trust the old domain have to a new one instantly. They need time to make sure that redirect is not a spam activity. It could take a time from 3 weeks to 6 months before things settled. 2. If you meant how long lasting of 301 redirect effect. It would take a few months ,3-6 may be, before Google transfer all factors to a new site completely. When the transfer completed, Google will have full aware of a new domain as a replcement to an old one and the effect of 301 redirect will be forever. The old domain can be dropped as it is no use anymore.