A man accused of trying to rob a Detroit store with a duct-taped gun was sentenced to federal prison.