Green’s Dictionary of Slang

duck n.8

[deuce n.1 (1)]

1. (US) in gambling, two.

[US]T.A. Dorgan in Zwilling TAD Lex. 102: Poker dice — well that’s my dish. Three ducks. That don’t beat sixes however.
[US]F. Wallace Poker 214: Duck — Deuce [HDAS].

2. (US prison) a two-year prison sentence.

[US]C. Shafer ‘Catheads [...] and Cho-Cho Sticks’ in Abernethy Bounty of Texas (1990) 203: duck, n. – a two-year sentence.