Australia's two-time Olympic champion Michael Diamond has lost an attempt to overturn a 10-year gun licence ban.