Select a set of elements from a 2D matrix, such that each element comes from distinct row and column
This is maximum matching in a weighted bipartite graph in disguise. (You can easily convert your objective of minimizing the sum of weights into one of maximizing it.)