Nonsingularity and group invertibility of linear combinations of two k-potent matrices