bond portfolio

If current bond portfolio has value of say X mln and duration D, but liabilities in 4 years are x+2 mln , how to define which bond and what amount of it to purchase in portfolio?