Get the index of the first occurrence of an element in the list. If there is no target element in the list, return -1