The only way to eliminate the effect of price risk is to hold the bond to maturity. The other risk, reinvestment risk, is in that if rates fall, although the value of the bond will rise, interest payments will have to be reinvested at lower rates, reducing the potential yield to maturity. Holding the bond does nothing to mitigate this risk. If they are actually reinvested at higher rates, the actual YTM will by higher than the stated rate. In real life, of course, rates fluctuate over the life of almost any bond, so some assumption has to be made, since we don't know what rates will be in the future.
Duration is expressed as a number of years from purchase date.
There have been some extremely complicated and confusing articles written about duration, but for all practical purposes, there are two main points that will tell you what you need to know under most circumstances. The first, and least useful, is that one can try to match duration with expected holding periods, under the theory that price and reinvestment risk will have offset each other at that time, or the portfolio can be hedged by using hedge vehicles whose durations match that of the portfolio. If you expect a bull market, buy duration as high as you can to the the biggest possible price move as rates fall. Everything about duration is a moving target. Duration at time of purchase will not be the same as time passes and market value of the bond changes.