A Ugandan court has sentenced a government official to 28 years in prison after finding him guilty of embezzling money from an Aids fund.