A man has been imprisoned after admitting stealing railway cable near Wakefield, causing disruption and significant costs.