First, select 2 out of the 3 different types of seeds, excluding types A and B, to plant at the two ends. Then, bundle types A and B together with the remaining type for a full permutation planting in the three fields not including the ends. Therefore, there are A32A22A22=24 methods,
Thus, the answer is: B.
First, select 2 out of the 3 different types of seeds, excluding types A and B, to plant at the two ends. Then, bundle types A and B together with the remaining type for a full permutation planting in the three fields not including the ends. According to the principle of step-by-step counting, this can be determined.
This question examines the application of counting principles, the ability to perform operations and solve problems, and the idea of discussing different cases. Pay attention to accumulating problem-solving methods. It is considered a medium-difficulty question.