Man who threatened to shoot Black family for moving into house jailed for two years