IF statement ignoring condition

So ive been working on a game where the player can shift its shape when press J, K, or L key. The problem is I want to restrict the player from pressing the same key twice so i code some if statement as below:-

public GameObject sphere;
public GameObject cube;
//public GameObject pyramid;

bool keypressJ = false;
bool keypressK = true;

void FixedUpdate()
        if (Input.GetKeyDown(KeyCode.J) && keypressJ == false)
            sphere.transform.position = cube.transform.position;

            keypressJ = true;
            keypressK = false;

            Debug.Log("keypress J = " + keypressJ);

        if (Input.GetKeyDown(KeyCode.K) && keypressK == false)
            cube.transform.position = sphere.transform.position;

            keypressJ = false;
            keypressK = true;

            Debug.Log("keypress J = " + keypressJ);

when i run the game it run perfectly on the first shift. but after it returns to cube shape, i cant shift it back to sphere. i have look around for answer but still couldnt find any. this is my first time posting on the community so i hope my question is clear enough. any help is very much appreciated.

what about this solution: save the keycode pressed if valid and do the transformation. always check and who’s the current saved keycode. that should already do it.
note: if you already have something that can be used for if checking, don’t so additional bools you need to handle.

Do never check down or up events (or generally anything that is only true for one frame) inside FixedUpdate. Those things can only be done in Update. FixedUpdate does not necessarily run every frame and can miss such events.