The vehicle should have posted to a fixed asset account, and the first year annual depreciation should have posted to another fixed asset account, usually a sub account of the vehicle. The fixed asset balance should have started as the total of the downpayment and the loan, which also posts to a loan liability account.
If you did not claim the annual depreciation that is an issue. The RIS allows you to decline to claim annual depreciation but when the asset is disposed of you must use the depreciation you did not claim. If this is the case then you need to get with a tax accountant.
Then create an income account called Gain/Loss on asset.
Use journal entries for the following
debit accumulated depreciation, credit gain/loss for the balance in the accumulated depreciation account
debit gain/loss, credit the fixed asset account for the balance in the fixed asset account
debit the loan liability account, credit the gain/loss account for the balance in the loan liability account
The debt is not a write off as you said, it is part of the disposition of the fixed asset.